[PATCH] D82520: [Power10] Implement Vector Splat Immediate Builtins in LLVM/Clang

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 26 12:02:20 PDT 2020


amyk added inline comments.


================
Comment at: clang/include/clang/Basic/BuiltinsPPC.def:449
 
+//P10 Vector Splat built-ins.
+BUILTIN(__builtin_vsx_xxspltiw, "V4UiIi", "")
----------------
Nit: space after `//`


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1477
   case PPCISD::XXSPLT:          return "PPCISD::XXSPLT";
+  case PPCISD::XXSPLTI_SP_TO_DP:
+                                return "PPCISD::XXSPLTI_SP_TO_DP";
----------------
This PPCISD node is not used anywhere?


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.h:100
 
+    /// XXSPLTI_SP_TO_DP - The PPC VSX splat instructions for immediates for
+    /// converting immediate single precision numbers to double precision
----------------
Maybe we can say `PPC VSX Splat Immediate instructions for converting . . .`


================
Comment at: llvm/lib/Target/PowerPC/PPCInstrPrefix.td:588
+
+  def : Pat<(int_ppc_vsx_xxspltiw timm:$A),
+            (XXSPLTIW $A)>;
----------------
There's a section for anonymous patterns at the bottom of the file. It may be better to have a separate `PrefixInstrs` anonymous patterns section there.


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

https://reviews.llvm.org/D82520





More information about the llvm-commits mailing list