From 1acd2f954aefd17b77d662b97e1d0f25a440e8f4 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Thu, 12 Dec 2024 15:03:16 -0800 Subject: [PATCH] Ensure simdTmpVar is inserted into the IR --- src/coreclr/jit/decomposelongs.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/coreclr/jit/decomposelongs.cpp b/src/coreclr/jit/decomposelongs.cpp index 6ebef7d4ff60b3..3ebe2656b75e50 100644 --- a/src/coreclr/jit/decomposelongs.cpp +++ b/src/coreclr/jit/decomposelongs.cpp @@ -1881,12 +1881,17 @@ GenTree* DecomposeLongs::DecomposeHWIntrinsicMoveMask(LIR::Use& use, GenTreeHWIn if (varTypeIsByte(simdBaseType)) { + // Create: + // simdTmpVar = op1 + GenTree* simdTmpVar = RepresentOpAsLocalVar(op1, node, &node->Op(1)); unsigned simdTmpVarNum = simdTmpVar->AsLclVarCommon()->GetLclNum(); JITDUMP("[DecomposeHWIntrinsicMoveMask]: Saving op1 tree to a temp var:\n"); DISPTREERANGE(Range(), simdTmpVar); Range().Remove(simdTmpVar); + Range().InsertBefore(node, simdTmpVar); + // Create: // simdTmpLo = GT_HWINTRINSIC{GetLower}(simdTmpVar) // loResult = GT_HWINTRINSIC{MoveMask}(simdTmpLo)