[llvm] PowerPC/VSX: Select FMINNUM_IEEE and FMAXNUM_IEEE (PR #112195)

YunQiang Su via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 21 18:25:38 PDT 2024


================
@@ -775,6 +775,10 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
     setOperationAction(ISD::FMAXNUM_IEEE, MVT::f32, Legal);
     setOperationAction(ISD::FMINNUM_IEEE, MVT::f64, Legal);
     setOperationAction(ISD::FMINNUM_IEEE, MVT::f32, Legal);
+    setOperationAction(ISD::FMAXNUM, MVT::f64, Legal);
+    setOperationAction(ISD::FMAXNUM, MVT::f32, Legal);
+    setOperationAction(ISD::FMINNUM, MVT::f64, Legal);
+    setOperationAction(ISD::FMINNUM, MVT::f32, Legal);
----------------
wzssyqa wrote:

> This is beyond what the title suggests. 

It's a bootstrap problem:
If we fix `FMAXNUM_IEEE` only, some of test cases will fail.
The problem is that currently `FMINNUM` is expanded to
   FCANONICALIZE + FCANONICALIZE + FMINNUM_IEEE
while FCANONICALIZE is not defined by here: I will submit it in a future patch.

> Do all subtargets have the ignore signaling behavior, and only vsx has the ieee behavior?

It seems that PowerPC doesn't have min/max operation in its scale part.

https://github.com/llvm/llvm-project/pull/112195


More information about the llvm-commits mailing list