[llvm] [IR] Implementation and lowering of bitinsert and bitextract (PR #200605)
Pedro Lobo via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 12 11:02:58 PDT 2026
================
@@ -4425,6 +4427,32 @@ void Verifier::visitShuffleVectorInst(ShuffleVectorInst &SV) {
visitInstruction(SV);
}
+void Verifier::visitBitInsertInst(BitInsertInst &BII) {
+ Check(BitInsertInst::isValidOperands(BII.getOperand(0), BII.getOperand(1),
+ BII.getOperand(2)),
+ "Invalid bitinsert operands!", &BII);
+ Check(DL.getTypeSizeInBits(BII.getOperand(0)->getType()) >=
+ DL.getTypeSizeInBits(BII.getOperand(1)->getType()),
+ "bitinsert val type cannot be wider than base type!", &BII);
+ if (auto *PTy = dyn_cast<PointerType>(BII.getOperand(1)->getType()))
+ Check(!DL.isNonIntegralPointerType(PTy),
+ "bitinsert not supported for non-integral pointer types", &BII);
----------------
pedroclobo wrote:
I see no reason why we cannot support non-integral pointers. Remove the check in b0e2155f821.
https://github.com/llvm/llvm-project/pull/200605
More information about the llvm-commits
mailing list