From 2952b46b16f5612ec882d8df11f1ba964d11e571 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 31 Aug 2018 08:34:20 -0400 Subject: [PATCH] emit_x64_vector: Amend value definition in SSE 4.1 path for EmitVectorSignExtend16() We should be defining the value after the results have been calculated to be consistent with the rest of the code. --- src/backend/x64/emit_x64_vector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/x64/emit_x64_vector.cpp b/src/backend/x64/emit_x64_vector.cpp index b6f70c34..06847c40 100644 --- a/src/backend/x64/emit_x64_vector.cpp +++ b/src/backend/x64/emit_x64_vector.cpp @@ -2452,8 +2452,8 @@ void EmitX64::EmitVectorSignExtend16(EmitContext& ctx, IR::Inst* inst) { auto args = ctx.reg_alloc.GetArgumentInfo(inst); if (code.DoesCpuSupport(Xbyak::util::Cpu::tSSE41)) { const Xbyak::Xmm a = ctx.reg_alloc.UseScratchXmm(args[0]); - ctx.reg_alloc.DefineValue(inst, a); code.pmovsxwd(a, a); + ctx.reg_alloc.DefineValue(inst, a); } else { const Xbyak::Xmm a = ctx.reg_alloc.UseXmm(args[0]); const Xbyak::Xmm result = ctx.reg_alloc.ScratchXmm();