summaryrefslogtreecommitdiff
path: root/src/jit/hwintrinsicxarch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/jit/hwintrinsicxarch.cpp')
-rw-r--r--src/jit/hwintrinsicxarch.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/jit/hwintrinsicxarch.cpp b/src/jit/hwintrinsicxarch.cpp
index fcc20e04c6..dc298ed230 100644
--- a/src/jit/hwintrinsicxarch.cpp
+++ b/src/jit/hwintrinsicxarch.cpp
@@ -847,6 +847,15 @@ GenTree* Compiler::impHWIntrinsic(NamedIntrinsic intrinsic,
case 1:
argType = JITtype2varType(strip(info.compCompHnd->getArgType(sig, argList, &argClass)));
op1 = getArgForHWIntrinsic(argType, argClass);
+ if ((category == HW_Category_MemoryLoad) && op1->OperIs(GT_CAST))
+ {
+ // Although the API specifies a pointer, if what we have is a BYREF, that's what
+ // we really want, so throw away the cast.
+ if (op1->gtGetOp1()->TypeGet() == TYP_BYREF)
+ {
+ op1 = op1->gtGetOp1();
+ }
+ }
retNode = gtNewSimdHWIntrinsicNode(retType, op1, intrinsic, baseType, simdSize);
break;
case 2: