[llvm] [IR] Add zext nneg flag (PR #67982)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 18 14:59:38 PDT 2023
================
@@ -4892,10 +4893,14 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
}
} else {
auto CastOp = (Instruction::CastOps)Opc;
+
if (!CastInst::castIsValid(CastOp, Op, ResTy))
return error("Invalid cast");
I = CastInst::Create(CastOp, Op, ResTy);
}
+ if (OpNum < Record.size() && isa<NonNegInstruction>(I) &&
+ (Record[OpNum] & (1 << bitc::NNI_NON_NEG)))
----------------
nikic wrote:
Is the "bug waiting to happen" that we are going to add 30 more flags to this instructions? That seems like a pretty contrived concern, especially when instructions can only have up to 7 flags.
https://github.com/llvm/llvm-project/pull/67982
More information about the llvm-commits
mailing list