diff options
author | Björn Gustavsson <[email protected]> | 2018-01-31 10:43:58 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2018-02-14 08:33:25 +0100 |
commit | 54b76b437c9008b3aedbf3fd75526ad4719bde7d (patch) | |
tree | f16f48e712a90a2f2df7a510abbd585930a85d50 /lib/compiler/src/beam_block.erl | |
parent | bf0d03bd6f393b6a4f7836c5203e9a83caf457e8 (diff) | |
download | otp-54b76b437c9008b3aedbf3fd75526ad4719bde7d.tar.gz otp-54b76b437c9008b3aedbf3fd75526ad4719bde7d.tar.bz2 otp-54b76b437c9008b3aedbf3fd75526ad4719bde7d.zip |
Disable CSE for floating point operations
As a preparation for combining blocks before running beam_block
for the second time, disable CSE for floating point operations
because it will generate invalid code.
Diffstat (limited to 'lib/compiler/src/beam_block.erl')
-rw-r--r-- | lib/compiler/src/beam_block.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/compiler/src/beam_block.erl b/lib/compiler/src/beam_block.erl index 7183381334..a4380a9314 100644 --- a/lib/compiler/src/beam_block.erl +++ b/lib/compiler/src/beam_block.erl @@ -628,7 +628,13 @@ cse_find(Expr, Es) -> end. cse_expr({set,[D],Ss,{bif,N,_}}) -> - {ok,D,{{bif,N},Ss}}; + case D of + {fr,_} -> + %% There are too many things that can go wrong. + none; + _ -> + {ok,D,{{bif,N},Ss}} + end; cse_expr({set,[D],Ss,{alloc,_,{gc_bif,N,_}}}) -> {ok,D,{{gc_bif,N},Ss}}; cse_expr({set,[D],Ss,put_list}) -> |