diff options
author | Björn Gustavsson <[email protected]> | 2019-01-08 15:47:46 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2019-01-11 15:05:11 +0100 |
commit | 5153e6840b09706dd87397ad116c8876b3df6793 (patch) | |
tree | a54180c537a998c70d7c2d2f6e4a13150d1c722d /lib/compiler | |
parent | 114ed6f86c8ab9b6a3dbaebe596934bc49e45b7a (diff) | |
download | otp-5153e6840b09706dd87397ad116c8876b3df6793.tar.gz otp-5153e6840b09706dd87397ad116c8876b3df6793.tar.bz2 otp-5153e6840b09706dd87397ad116c8876b3df6793.zip |
beam_ssa_pre_codegen: Don't use z registers for 'xor' and 'is_record'
There is no easy way to convert xor or is_record/2 to test operations.
Diffstat (limited to 'lib/compiler')
-rw-r--r-- | lib/compiler/src/beam_ssa_pre_codegen.erl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/compiler/src/beam_ssa_pre_codegen.erl b/lib/compiler/src/beam_ssa_pre_codegen.erl index b940c0fdc2..fa1b7bb71e 100644 --- a/lib/compiler/src/beam_ssa_pre_codegen.erl +++ b/lib/compiler/src/beam_ssa_pre_codegen.erl @@ -2008,6 +2008,14 @@ reserve_zreg([#b_set{op={bif,tuple_size},dst=Dst}, reserve_zreg([#b_set{op={bif,tuple_size},dst=Dst}], #b_switch{}, ShortLived, A) -> reserve_zreg_1(Dst, ShortLived, A); +reserve_zreg([#b_set{op={bif,'xor'}}], _Last, _ShortLived, A) -> + %% There is no short, easy way to rewrite 'xor' to a series of + %% test instructions. + A; +reserve_zreg([#b_set{op={bif,is_record}}], _Last, _ShortLived, A) -> + %% There is no short, easy way to rewrite is_record/2 to a series of + %% test instructions. + A; reserve_zreg([#b_set{op=Op,dst=Dst}|Is], Last, ShortLived, A0) -> IsZReg = case Op of bs_match_string -> true; |