[llvm] [ConstraintElimination] Add support for UCMP/SCMP intrinsics (PR #97974)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 9 04:34:15 PDT 2024
================
@@ -1736,6 +1765,11 @@ static bool eliminateConstraints(Function &F, DominatorTree &DT, LoopInfo &LI,
Changed |= Simplified;
} else if (auto *MinMax = dyn_cast<MinMaxIntrinsic>(Inst)) {
Changed |= checkAndReplaceMinMax(MinMax, Info, ToRemove);
+ } else if (auto *CmpIntrinsic = dyn_cast<IntrinsicInst>(Inst);
+ CmpIntrinsic &&
+ (CmpIntrinsic->getIntrinsicID() == Intrinsic::scmp ||
+ CmpIntrinsic->getIntrinsicID() == Intrinsic::ucmp)) {
----------------
Poseydon42 wrote:
Added the suggested class. I can't think of any good way to remove code duplication between `icmp` and `ucmp/scmp`, but if there are any suggestions I'm happy to implement them.
https://github.com/llvm/llvm-project/pull/97974
More information about the llvm-commits
mailing list