diff options
author | Björn Gustavsson <[email protected]> | 2019-04-08 12:42:09 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2019-04-08 12:42:09 +0200 |
commit | 0291ddd3ffbd7e23d95cc35e081c99f4bac9a2dd (patch) | |
tree | f0f4110247b67fa0464ab1a535be7fa5f23b4b89 /erts | |
parent | f93862d2fe7e994523b1a6b2ca99635a4cf5bba3 (diff) | |
parent | ef6d5f9e329a381ce25887c104b8aa560d3ff8ee (diff) | |
download | otp-0291ddd3ffbd7e23d95cc35e081c99f4bac9a2dd.tar.gz otp-0291ddd3ffbd7e23d95cc35e081c99f4bac9a2dd.tar.bz2 otp-0291ddd3ffbd7e23d95cc35e081c99f4bac9a2dd.zip |
Merge pull request #2202 from bjorng/bjorn/tune-beam-4
Optimize the i_minus instruction
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/beam/ops.tab | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab index 7a125b0f67..10ca74cd60 100644 --- a/erts/emulator/beam/ops.tab +++ b/erts/emulator/beam/ops.tab @@ -1690,9 +1690,14 @@ i_plus S1=c S2=c Fail Dst => move S1 x | i_plus x S2 Fail Dst i_plus xy xyc j? d -i_minus x x j? d -i_minus c x j? d -i_minus s s j? d +# A minus instruction with a constant right operand will be +# converted to an i_increment instruction, except in guards or +# when the negated value of the constant won't fit in a guard. +# Therefore, it very rare. +i_minus S1 S2=c Fail Dst => move S2 x | i_minus S1 x Fail Dst + +i_minus xy xy j? d +i_minus c xy j? d i_times j? s s d |