[PATCH] D15887: [Power9] Implement new altivec instructions: permute, count zero, extend sign, negate, parity, shift/rotate, mul10

Kit Barton via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 27 10:44:56 PST 2016


kbarton added inline comments.

================
Comment at: lib/Target/PowerPC/PPCInstrAltivec.td:1231
@@ +1230,3 @@
+// Vector Count Trailing Zeros
+// TODO: map to llvm cttz?
+def VCTZB : VX_VT5_EO5_VB5<1538, 28, "vctzb", []>;
----------------
I would prefer to keep track of the questionable TODOs in a separate file, as opposed to scattering them throughout this file. 
In my experience, these have a way of entering the code, but never getting cleaned up. 

We talked about creating a README_P9.txt file in the lib/Target/PowerPC directory to contain this type of (possibly) outstanding items to do. 

================
Comment at: lib/Target/PowerPC/PPCInstrAltivec.td:1238
@@ +1237,3 @@
+// Vector Extend Sign
+// TODO: map to llvm sext?
+def VEXTSB2W : VX_VT5_EO5_VB5<1538, 16, "vextsb2w", []>; //  v4i8 -> v4i32
----------------
Move to separate file

================
Comment at: lib/Target/PowerPC/PPCInstrAltivec.td:1246
@@ +1245,3 @@
+// Vector Integer Negate
+// TODO: map to llvm ineg?
+def VNEGW : VX_VT5_EO5_VB5<1538, 6, "vnegw", []>;
----------------
Move to separate file.

================
Comment at: lib/Target/PowerPC/PPCInstrAltivec.td:1258
@@ +1257,3 @@
+                       "vbpermd $vD, $vA, $vB", IIC_VecFP, []>;
+// TODO: use VA1a_Int_Ty3 for intrinsic support
+def VPERMR : VAForm_1a<59, (outs vrrc:$vD), (ins vrrc:$vA, vrrc:$vB, vrrc:$vC),
----------------
Is this referring to adding intrinsic support for this instruction, or something else? 
This should apply to almost all of these instructions being added. Again, this is something we want to track in a separate file. 


http://reviews.llvm.org/D15887





More information about the llvm-commits mailing list