https://github.com/Ko496-glitch created https://github.com/llvm/llvm-project/pull/189305
#189260 Fix assertion failure in boolean vector indexing by truncating to i1. >From 0283bf6204c38b5289a8d4a64c01d2544073bf6e Mon Sep 17 00:00:00 2001 From: kartikohlan <[email protected]> Date: Sun, 29 Mar 2026 23:49:47 -0400 Subject: [PATCH] [Clang] Fix assertion failure (#189260) --- clang/lib/CodeGen/CGExpr.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index eebb36276e0eb..1c305dd1b5018 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -2756,6 +2756,10 @@ void CodeGenFunction::EmitStoreThroughLValue(RValue Src, LValue Dst, Builder.getInt1Ty(), IRStoreTy->getPrimitiveSizeInBits()); Vec = Builder.CreateBitCast(Vec, IRVecTy); // iN --> <N x i1>. + + if(SrcVal->getType() != Builder.getInt1Ty()) + SrcVal = Builder.CreateTrunc(SrcVal,Builder.getInt1Ty()); + } } // Allow inserting `<1 x T>` into an `<N x T>`. It can happen with scalar _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
