================
@@ -3128,6 +3128,38 @@ static bool interp__builtin_ia32_vpconflict(InterpState 
&S, CodePtr OpPC,
   return true;
 }
 
+static bool interp__builtin_x86_byteshift(
+    InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID,
+    llvm::function_ref<APInt(const Pointer &, PrimType ElemT, unsigned Lane,
+                             unsigned I, unsigned Shift)>
+        Fn) {
+  assert(Call->getNumArgs() == 2);
+
+  APSInt ImmAPS = popToAPSInt(S, Call->getArg(1));
+  uint64_t Shift = ImmAPS.getZExtValue();
----------------
RKSimon wrote:

Consult EmitX86BuiltinExpr - we only the bottom imm8
```suggestion
  uint64_t Shift = ImmAPS.getZExtValue() & 0xff;
```

https://github.com/llvm/llvm-project/pull/164166
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to