[PATCH] D82359: [Power10] Implement Vector Replace Builtins in LLVM/Clang

Lei Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 23 07:58:50 PDT 2020


lei added inline comments.


================
Comment at: clang/lib/Headers/altivec.h:16833
 }
+
+/* vec_replace */
----------------
Nit: It would be good if we can keep the indentation for these definitions consistent.


================
Comment at: llvm/include/llvm/IR/IntrinsicsPowerPC.td:429
+
+  //P10 Vector Insert with immediate
+  def int_ppc_altivec_vinsw : GCCBuiltin<"__builtin_altivec_vinsw">,
----------------
nit: `// P10 Vector Insert with immediate.`
Please end all sentences with a `.`
Space after `//`


================
Comment at: llvm/lib/Target/PowerPC/PPCInstrPrefix.td:211
+// We use VXForm_1 to implement it, that is, we use "VRA" (5 bit) to represent
+// "/ UIM" (unused bit followed by a 4-bit immediate)
+class VX_VRT5_UIM5_RB5<bits<11> xo, string opc, list<dag> pattern>
----------------
nit: missing `.`


================
Comment at: llvm/lib/Target/PowerPC/PPCInstrPrefix.td:579
+  def VINSW : VX_VRT5_UIM5_RB5<207, "vinsw", [(set v4i32:$VRT, (int_ppc_altivec_vinsw
+                         i64:$RB, timm:$UIM))]>;
+  def VINSD : VX_VRT5_UIM5_RB5<463, "vinsd", [(set v2i64:$VRT, (int_ppc_altivec_vinsd
----------------
nit: indentation.


================
Comment at: llvm/lib/Target/PowerPC/PPCInstrPrefix.td:581
+  def VINSD : VX_VRT5_UIM5_RB5<463, "vinsd", [(set v2i64:$VRT, (int_ppc_altivec_vinsd
+                         i64:$RB, timm:$UIM))]>;
 }
----------------
indentation.


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

https://reviews.llvm.org/D82359





More information about the llvm-commits mailing list