================
@@ -11665,8 +11665,20 @@ static bool evalShuffleGeneric(
     if (SrcIdx < 0) {
       // Zero out this element
       QualType ElemTy = VT->getElementType();
-      ResultElements.push_back(
-          APValue(APFloat::getZero(Info.Ctx.getFloatTypeSemantics(ElemTy))));
+      if (ElemTy->isRealFloatingType()) {
+        ResultElements.push_back(
+            APValue(APFloat::getZero(Info.Ctx.getFloatTypeSemantics(ElemTy))));
+      } else if (ElemTy->isIntegerType()) {
+        unsigned BitWidth = Info.Ctx.getTypeSize(ElemTy);
+        bool IsUnsigned = ElemTy->isUnsignedIntegerType();
+        llvm::APSInt ZeroValue(BitWidth, IsUnsigned);
+        ZeroValue = 0;
+        ResultElements.push_back(APValue(ZeroValue));
----------------
tbaederr wrote:

I guess it makes sense, but I don't know in how many places we'd end up using 
it.

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

Reply via email to