[PATCH] D115381: [AArch64][GlobalISel] Select scalar G_FMAXIMUM + G_FMINIMUM

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 9 21:06:41 PST 2021


paquette added inline comments.


================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/select-fmaximum.mir:43
+    ; CHECK-NEXT: %b:fpr32 = COPY $s1
+    ; CHECK-NEXT: %select_me:fpr32 = FMAXSrr %a, %b
+    ; CHECK-NEXT: $s0 = COPY %select_me
----------------
jroelofs wrote:
> Am I reading the ARM/GISel docs correctly that G_FMAXIMUM corresponds to the FMAX instructions, G_FMAXNUM_IEEE corresponds to FMAXNM, and that there isn't direct support on ARMv8 for G_FMAXNUM?
> 
> A quick look at the SelectionDAG code suggests the opposite re: FMAXNM vs FMAXNM_IEEE though... so there's either a bug in my understanding, or SDAG got it wrong?
Apparently AArch64InstrInfo.td says...

```
defm FMAXNM : TwoOperandFPData<0b0110, "fmaxnm", fmaxnum>;
defm FMAX   : TwoOperandFPData<0b0100, "fmax", fmaximum>;
```

So I'd assume

G_FMAXNUM -> fmaxnm
G_FMAXIMUM -> fmax

Maybe I'm wrong though?



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115381/new/

https://reviews.llvm.org/D115381



More information about the llvm-commits mailing list