================ @@ -1693,6 +1693,22 @@ getBitTestAtomicOrdering(BitTest::InterlockingKind I) { llvm_unreachable("invalid interlocking"); } +static llvm::Value *EmitIntegerExpr(CodeGenFunction &CGF, const Expr *E) { + llvm::Value *ArgValue = CGF.EmitScalarExpr(E); + llvm::Type *ArgType = ArgValue->getType(); + + if (auto *VT = dyn_cast<llvm::FixedVectorType>(ArgType); + VT && VT->getElementType()->isIntegerTy(1)) { + llvm::Type *StorageType = CGF.ConvertTypeForMem(E->getType()); + ArgValue = CGF.emitBoolVecConversion( + ArgValue, StorageType->getPrimitiveSizeInBits(), "insertvec"); + ArgValue = CGF.Builder.CreateBitCast(ArgValue, StorageType); ---------------- rjmccall wrote:
LLVM may let you just `bitcast` directly to `iN`, which would both avoid the poison problem and let you avoid making any adjustments. Otherwise yeah, you'll need to extend with an actual zero and then subtract off the excess. https://github.com/llvm/llvm-project/pull/154203 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits