[PATCH] D86605: [PowerPC] Expand constrained ppc_fp128 to i32 conversion

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 4 03:52:53 PDT 2020


uweigand added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:8206
+          APFloat APF = APFloat(APFloat::PPCDoubleDouble());
+          APF.convertFromAPInt(SignMask, false, APFloat::rmNearestTiesToEven);
+
----------------
Just a minor nit: this should be the same constant that the non-strict code also uses.  It seems better to create the constant in the same way (code can be shared between both cases).


================
Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.td:2970
   def FADDrtz: PPCCustomInserterPseudo<(outs f8rc:$FRT), (ins f8rc:$FRA, f8rc:$FRB), "",
-                      [(set f64:$FRT, (PPCfaddrtz f64:$FRA, f64:$FRB))]>;
+                      [(set f64:$FRT, (PPCany_faddrtz f64:$FRA, f64:$FRB))]>;
 }
----------------
You should verify the FADDrtz custom inserter works correctly for the strict case.  I believe it should transfer the no-exception flag to the FADD it generates in the end.


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

https://reviews.llvm.org/D86605



More information about the llvm-commits mailing list