summaryrefslogtreecommitdiff
path: root/lib/compiler/src/beam_validator.erl
diff options
context:
space:
mode:
authorJohn Högberg <john@erlang.org>2021-12-02 16:11:55 +0100
committerJohn Högberg <john@erlang.org>2021-12-16 11:47:30 +0100
commiteeab784f88d4cfd6417a6b21fbcf750a6e25d453 (patch)
tree9fa612a6d255cde764eeb6cbdaae9d35a7832551 /lib/compiler/src/beam_validator.erl
parenta641723a1423510accb4483620eaeaa7a0a6c3df (diff)
downloaderlang-eeab784f88d4cfd6417a6b21fbcf750a6e25d453.tar.gz
jit: Optimize float instructions
Help the renamer by using XMM registers throughout, and inline small-to-float conversion so we can take advantage of type information.
Diffstat (limited to 'lib/compiler/src/beam_validator.erl')
-rw-r--r--lib/compiler/src/beam_validator.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/compiler/src/beam_validator.erl b/lib/compiler/src/beam_validator.erl
index fe6bb2e7c9..6ae57c7a1b 100644
--- a/lib/compiler/src/beam_validator.erl
+++ b/lib/compiler/src/beam_validator.erl
@@ -985,7 +985,9 @@ vi({bs_set_position, Ctx, Pos}, Vst0) ->
%%
%% Floating-point instructions (excluding BIFs)
%%
-vi({fconv,Src,{fr,_}=Dst}, Vst) ->
+vi({fconv,Src0,{fr,_}=Dst}, Vst) ->
+ Src = unpack_typed_arg(Src0),
+
assert_term(Src, Vst),
branch(?EXCEPTION_LABEL, Vst,
fun(SuccVst0) ->