[llvm] [IR] Add `samesign` flag to icmp instruction (PR #111419)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 13 13:16:53 PDT 2024
================
@@ -5482,6 +5482,8 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
if (!CmpInst::isIntPredicate(PredVal))
return error("Invalid icmp predicate");
I = new ICmpInst(PredVal, LHS, RHS);
+ if (Record[OpNum] & (1 << bitc::PSSI_SAME_SIGN))
+ cast<ICmpInst>(I)->setSameSign(true);
----------------
elhewaty wrote:
@nikic I am working on it now. but I don't fully understand why we should record length.
can you please give a brief explanation of what the record does?
https://github.com/llvm/llvm-project/pull/111419
More information about the llvm-commits
mailing list