[llvm] [GlobalIsel] Combine select to integer minmax. (PR #77213)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 8 22:52:27 PST 2024
================
@@ -6548,6 +6548,87 @@ bool CombinerHelper::tryFoldBoolSelectToLogic(GSelect *Select,
return false;
}
+bool CombinerHelper::tryFoldSelectToIntMinMax(GSelect *Select,
+ BuildFnTy &MatchInfo) {
+ Register DstReg = Select->getReg(0);
+ Register Cond = Select->getCondReg();
+ Register True = Select->getTrueReg();
+ Register False = Select->getFalseReg();
+ LLT DstTy = MRI.getType(DstReg);
+
----------------
arsenm wrote:
Missing hasOneUse check?
https://github.com/llvm/llvm-project/pull/77213
More information about the llvm-commits
mailing list