aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-02-25 15:45:00 +0100
committerBjörn Gustavsson <[email protected]>2019-02-28 12:18:24 +0100
commit8d026110bf57d66aeb25f9d294fc619453744f24 (patch)
treed9af91452c662e61d2c8925fce55b13bfe5ea95f /erts
parentcb2eb1766b5db1d5462a63025e99496ec8c6969b (diff)
downloadotp-8d026110bf57d66aeb25f9d294fc619453744f24.tar.gz
otp-8d026110bf57d66aeb25f9d294fc619453744f24.tar.bz2
otp-8d026110bf57d66aeb25f9d294fc619453744f24.zip
Remove rarely used swap instructions
`swap x y` is rarely or never used. I found a single use of `swap_temp x y x` in the sample of modules compiled by `scripts/diffable`.
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/ops.tab6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab
index 9958d072e7..07357a559f 100644
--- a/erts/emulator/beam/ops.tab
+++ b/erts/emulator/beam/ops.tab
@@ -288,7 +288,7 @@ move_window4 x x x x y
move_window5 x x x x x y
# Swap registers.
-move R1=x Tmp=x | move R2=xy R1 | move Tmp R2 => swap_temp R1 R2 Tmp
+move R1=x Tmp=x | move R2=x R1 | move Tmp R2 => swap_temp R1 R2 Tmp
swap_temp R1 R2 Tmp | line Loc | apply Live | is_killed_apply(Tmp, Live) => \
swap R1 R2 | line Loc | apply Live
@@ -307,9 +307,9 @@ swap_temp R1 R2 Tmp | line Loc | call_ext_only Live Addr | \
swap_temp R1 R2 Tmp | line Loc | call_ext_last Live Addr D | \
is_killed(Tmp, Live) => swap R1 R2 | line Loc | call_ext_last Live Addr D
-swap_temp x xy x
+swap_temp x x x
-swap x xy
+swap x x
# move_dup