diff options
author | Björn Gustavsson <[email protected]> | 2018-04-29 16:32:03 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2018-08-17 09:50:59 +0200 |
commit | 6065d9f8540cd4621cbace0cd4d485956a720fd6 (patch) | |
tree | a88154e19f3827eb5f87edd43f97fe1fce20078d /lib/compiler/src/beam_a.erl | |
parent | ec64aa2d6f5391fa49c6a6d05713267485654ab2 (diff) | |
download | otp-6065d9f8540cd4621cbace0cd4d485956a720fd6.tar.gz otp-6065d9f8540cd4621cbace0cd4d485956a720fd6.tar.bz2 otp-6065d9f8540cd4621cbace0cd4d485956a720fd6.zip |
Simplify optimizations by introducing is_nil late
Diffstat (limited to 'lib/compiler/src/beam_a.erl')
-rw-r--r-- | lib/compiler/src/beam_a.erl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/compiler/src/beam_a.erl b/lib/compiler/src/beam_a.erl index 6fd4ace540..a26f245446 100644 --- a/lib/compiler/src/beam_a.erl +++ b/lib/compiler/src/beam_a.erl @@ -113,6 +113,8 @@ rename_instr({put_map_exact,Fail,S,D,R,L}) -> {put_map,Fail,exact,S,D,R,L}; rename_instr({test,has_map_fields,Fail,Src,{list,List}}) -> {test,has_map_fields,Fail,[Src|List]}; +rename_instr({test,is_nil,Fail,[Src]}) -> + {test,is_eq_exact,Fail,[Src,nil]}; rename_instr({select_val=I,Reg,Fail,{list,List}}) -> {select,I,Reg,Fail,List}; rename_instr({select_tuple_arity=I,Reg,Fail,{list,List}}) -> |