[PATCH] D18142: [mips] Range check uimm4_ptr and uimm6_ptr and use correctly sized immediates in MSA copy/insert.
Vasileios Kalintiris via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 15 07:58:56 PDT 2016
vkalintiris accepted this revision.
vkalintiris added a comment.
This revision is now accepted and ready to land.
LGTM. I've posted some comments, and a question that I have, inline.
================
Comment at: lib/Target/Mips/MipsInstrInfo.td:708
@@ -707,1 +707,3 @@
+foreach I = {1, 2, 3, 4, 6} in
+ def uimm # I # _ptr : Operand<iPTR> {
----------------
We don't need uimm6_ptr anymore.
================
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);}]>;
----------------
I don't believe that we need this any more.
================
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,
MSA128W>;
-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,
MSA128D>;
----------------
Shouldn't we use immZExt1Ptr and immZExt2Ptr instead of immZExt3Ptr and immZExt4Ptr?
http://reviews.llvm.org/D18142
More information about the llvm-commits
mailing list