[PATCH] D18142: [mips] Range check uimm4_ptr and uimm6_ptr and use correctly sized immediates in MSA copy/insert.

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 15 08:17:55 PDT 2016

dsanders added inline comments.

Comment at: lib/Target/Mips/MipsMSAInstrInfo.td:70
@@ -68,3 +69,3 @@
 def immZExt4Ptr : ImmLeaf<iPTR, [{return isUInt<4>(Imm);}]>;
 def immZExt6Ptr : ImmLeaf<iPTR, [{return isUInt<6>(Imm);}]>;
vkalintiris wrote:
> I don't believe that we need this any more.
immZExt4Ptr is still used by COPY_[US]_B but you're correct that immZExt6Ptr isn't.

Comment at: lib/Target/Mips/MipsMSAInstrInfo.td:1885-1890
@@ -1884,6 +1884,8 @@
-class COPY_FW_PSEUDO_DESC : MSA_COPY_PSEUDO_BASE<vector_extract, v4f32, FGR32,
+class COPY_FW_PSEUDO_DESC : MSA_COPY_PSEUDO_BASE<vector_extract, v4f32,
+                                                 uimm4_ptr, immZExt4Ptr, FGR32,
-class COPY_FD_PSEUDO_DESC : MSA_COPY_PSEUDO_BASE<vector_extract, v2f64, FGR64,
+class COPY_FD_PSEUDO_DESC : MSA_COPY_PSEUDO_BASE<vector_extract, v2f64,
+                                                 uimm3_ptr, immZExt3Ptr, FGR64,
vkalintiris wrote:
> Shouldn't we use immZExt1Ptr and immZExt2Ptr instead of immZExt3Ptr and immZExt4Ptr?
Good point. I'll fix the test cases too.


More information about the llvm-commits mailing list