[llvm] [CodeGen] Add nneg and disjoint flags (PR #86650)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 26 06:25:43 PDT 2024
Thorsten =?utf-8?q?Schütt?= <schuett at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/86650 at github.com>
================
@@ -555,6 +555,16 @@ uint32_t MachineInstr::copyFlagsFromInstruction(const Instruction &I) {
MIFlags |= MachineInstr::MIFlag::NoUWrap;
}
+ // Copy the nonneg flag.
+ if (const PossiblyNonNegInst *PNI = dyn_cast<PossiblyNonNegInst>(&I))
+ if (PNI->hasNonNeg())
+ MIFlags |= MachineInstr::MIFlag::NonNeg;
+
+ // Copy the disjoint flag.
+ if (const PossiblyDisjointInst *PD = dyn_cast<PossiblyDisjointInst>(&I))
----------------
arsenm wrote:
else if? these are mutually exclusive?
https://github.com/llvm/llvm-project/pull/86650
More information about the llvm-commits
mailing list