[llvm] [IR] Add zext nneg flag (PR #67982)

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 10:32:24 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)))
----------------
goldsteinn wrote:

If there is a reason to keep as log then this should be `ResTypeID(1) << ...` and below should be `uint64_t(1) << ...`

https://github.com/llvm/llvm-project/pull/67982


More information about the llvm-commits mailing list