================
@@ -4668,6 +4668,57 @@ static bool interp__builtin_ia32_bmac(InterpState &S, 
CodePtr OpPC,
   return true;
 }
 
+static bool interp_builtin_ia32_cvt_scalar_to_int(InterpState &S, CodePtr OpPC,
+                                                  const CallExpr *E) {
+  Pointer SrcVecPtr = S.Stk.pop<Pointer>();
+  Pointer Lane0Ptr = SrcVecPtr.atIndex(0);
+  const Floating &FloatElem = Lane0Ptr.deref<Floating>();
+  unsigned BitWidth = S.getASTContext().getIntWidth(E->getType());
+
+  llvm::APSInt IntResult(BitWidth, /*isUnsigned=*/false);
----------------
RKSimon wrote:

Can we use the call to determine signedness? AFAICT all builtin signatures are 
coorect - and it will make it easier to extend to the avx512 intrinsics in the 
future.

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

Reply via email to