[llvm] [IR] Add zext nneg flag (PR #67982)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 18 00:51:30 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:
This is just following the same convention used for the other flags (OBO and PEO): https://github.com/llvm/llvm-project/blob/e93bddb2874db5520dfedecac6c6a13ffa4e7e5e/llvm/lib/Bitcode/Reader/BitcodeReader.cpp#L4849-L4863
https://github.com/llvm/llvm-project/pull/67982
More information about the llvm-commits
mailing list