[llvm] [RISCV][GISel] Lower G_ABDS and G_ABDU (PR #155888)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 2 09:35:06 PDT 2025
================
@@ -1337,6 +1337,9 @@ bool RISCVLegalizerInfo::legalizeCustom(
return false;
case TargetOpcode::G_ABS:
return Helper.lowerAbsToMaxNeg(MI);
+ case TargetOpcode::G_ABDS:
+ case TargetOpcode::G_ABDU:
+ return Helper.lowerAbsDiffToMinMax(MI);
----------------
topperc wrote:
Can we make this decision in the legalizer using `LI.isLegal` to check if min/max is legal?
https://github.com/llvm/llvm-project/pull/155888
More information about the llvm-commits
mailing list