[PATCH] D119819: [ARM] Recognize SSAT and USAT from SMIN/SMAX
Sjoerd Meijer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 16 01:44:37 PST 2022
SjoerdMeijer added inline comments.
================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:1567
+ setTargetDAGCombine(ISD::SMIN);
+ setTargetDAGCombine(ISD::SMAX);
+ }
----------------
I was just curious if we need to set a target combine for SMAX given that SMIN is the root of the node that we are matching; don't know how that works exactly...
================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:17561
+// Lower smin(smax(x, C1), C2) to ssat or usat, if we they have saturating
+// constant bounds.
----------------
Typo: we they
================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:17610
+ if (VT == MVT::i32)
+ return PerformMinMaxToSatCombine(SDValue(N, 0), DAG, ST);
+
----------------
Should we try `PerformVQDMULHCombine` if this returns `SDValue()`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119819/new/
https://reviews.llvm.org/D119819
More information about the llvm-commits
mailing list