[PATCH] D47550: [Power9] Add __float128 builtins for Round To Odd

Lei Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 30 14:09:47 PDT 2018


lei added inline comments.


================
Comment at: lib/Target/PowerPC/PPCInstrVSX.td:2441
+  def XSADDQPO : X_VT5_VA5_VB5_Ro<63, 4, "xsaddqpo",
+                                  [ (set f128
+                                     : $vT, (int_ppc_addf128_round_to_odd f128
----------------
It's kind of hard to read... any reason why you separate f128 from ":$vt"?  I would think they should be kept together as it indicates that $vT is of type f128.
In general variables and their type are kept together eg. `set f128:$vT`


================
Comment at: lib/Target/PowerPC/PPCInstrVSX.td:2443
+                                     : $vT, (int_ppc_addf128_round_to_odd f128
+                                             : $vA, f128
+                                             : $vB)) ]>;
----------------
same as above for all the patterns.


================
Comment at: lib/Target/PowerPC/PPCInstrVSX.td:2485
+
+  def : Pat<(int_ppc_fmaf128_round_to_odd f128:$vA,f128:$vB,f128:$vTi),
+              (XSMADDQPO $vA,$vB,$vTi)>;
----------------
Why is this an anonymous pattern as oppose to the default pattern for `XSMADDQPO`?  That is what you did for all the other ones ...


https://reviews.llvm.org/D47550





More information about the llvm-commits mailing list