@@ -812,87 +812,56 @@ def fixedpoint_recip_f16_i64 : fixedpoint_recip_i64<f16>;
812812def fixedpoint_recip_f32_i64 : fixedpoint_recip_i64<f32>;
813813def fixedpoint_recip_f64_i64 : fixedpoint_recip_i64<f64>;
814814
815- def vecshiftR8 : Operand<i32>, ImmLeaf <i32, [{
815+ def vecshiftR8 : Operand<i32>, TImmLeaf <i32, [{
816816 return (((uint32_t)Imm) > 0) && (((uint32_t)Imm) < 9);
817817}]> {
818818 let EncoderMethod = "getVecShiftR8OpValue";
819819 let DecoderMethod = "DecodeVecShiftR8Imm";
820820 let ParserMatchClass = Imm1_8Operand;
821821}
822- def vecshiftR16 : Operand<i32>, ImmLeaf <i32, [{
822+ def vecshiftR16 : Operand<i32>, TImmLeaf <i32, [{
823823 return (((uint32_t)Imm) > 0) && (((uint32_t)Imm) < 17);
824824}]> {
825825 let EncoderMethod = "getVecShiftR16OpValue";
826826 let DecoderMethod = "DecodeVecShiftR16Imm";
827827 let ParserMatchClass = Imm1_16Operand;
828828}
829- def vecshiftR16Narrow : Operand<i32>, ImmLeaf <i32, [{
829+ def vecshiftR16Narrow : Operand<i32>, TImmLeaf <i32, [{
830830 return (((uint32_t)Imm) > 0) && (((uint32_t)Imm) < 9);
831831}]> {
832832 let EncoderMethod = "getVecShiftR16OpValue";
833833 let DecoderMethod = "DecodeVecShiftR16ImmNarrow";
834834 let ParserMatchClass = Imm1_8Operand;
835835}
836- def vecshiftR32 : Operand<i32>, ImmLeaf <i32, [{
836+ def vecshiftR32 : Operand<i32>, TImmLeaf <i32, [{
837837 return (((uint32_t)Imm) > 0) && (((uint32_t)Imm) < 33);
838838}]> {
839839 let EncoderMethod = "getVecShiftR32OpValue";
840840 let DecoderMethod = "DecodeVecShiftR32Imm";
841841 let ParserMatchClass = Imm1_32Operand;
842842}
843- def vecshiftR32Narrow : Operand<i32>, ImmLeaf <i32, [{
843+ def vecshiftR32Narrow : Operand<i32>, TImmLeaf <i32, [{
844844 return (((uint32_t)Imm) > 0) && (((uint32_t)Imm) < 17);
845845}]> {
846846 let EncoderMethod = "getVecShiftR32OpValue";
847847 let DecoderMethod = "DecodeVecShiftR32ImmNarrow";
848848 let ParserMatchClass = Imm1_16Operand;
849849}
850- def vecshiftR64 : Operand<i32>, ImmLeaf <i32, [{
850+ def vecshiftR64 : Operand<i32>, TImmLeaf <i32, [{
851851 return (((uint32_t)Imm) > 0) && (((uint32_t)Imm) < 65);
852852}]> {
853853 let EncoderMethod = "getVecShiftR64OpValue";
854854 let DecoderMethod = "DecodeVecShiftR64Imm";
855855 let ParserMatchClass = Imm1_64Operand;
856856}
857- def vecshiftR64Narrow : Operand<i32>, ImmLeaf <i32, [{
857+ def vecshiftR64Narrow : Operand<i32>, TImmLeaf <i32, [{
858858 return (((uint32_t)Imm) > 0) && (((uint32_t)Imm) < 33);
859859}]> {
860860 let EncoderMethod = "getVecShiftR64OpValue";
861861 let DecoderMethod = "DecodeVecShiftR64ImmNarrow";
862862 let ParserMatchClass = Imm1_32Operand;
863863}
864864
865- // Same as vecshiftR#N, but use TargetConstant (TimmLeaf) instead of Constant
866- // (ImmLeaf)
867- def tvecshiftR8 : Operand<i32>, TImmLeaf<i32, [{
868- return (((uint32_t)Imm) > 0) && (((uint32_t)Imm) < 9);
869- }]> {
870- let EncoderMethod = "getVecShiftR8OpValue";
871- let DecoderMethod = "DecodeVecShiftR8Imm";
872- let ParserMatchClass = Imm1_8Operand;
873- }
874- def tvecshiftR16 : Operand<i32>, TImmLeaf<i32, [{
875- return (((uint32_t)Imm) > 0) && (((uint32_t)Imm) < 17);
876- }]> {
877- let EncoderMethod = "getVecShiftR16OpValue";
878- let DecoderMethod = "DecodeVecShiftR16Imm";
879- let ParserMatchClass = Imm1_16Operand;
880- }
881- def tvecshiftR32 : Operand<i32>, TImmLeaf<i32, [{
882- return (((uint32_t)Imm) > 0) && (((uint32_t)Imm) < 33);
883- }]> {
884- let EncoderMethod = "getVecShiftR32OpValue";
885- let DecoderMethod = "DecodeVecShiftR32Imm";
886- let ParserMatchClass = Imm1_32Operand;
887- }
888- def tvecshiftR64 : Operand<i32>, TImmLeaf<i32, [{
889- return (((uint32_t)Imm) > 0) && (((uint32_t)Imm) < 65);
890- }]> {
891- let EncoderMethod = "getVecShiftR64OpValue";
892- let DecoderMethod = "DecodeVecShiftR64Imm";
893- let ParserMatchClass = Imm1_64Operand;
894- }
895-
896865def Imm0_0Operand : AsmImmRange<0, 0>;
897866def Imm0_1Operand : AsmImmRange<0, 1>;
898867def Imm1_1Operand : AsmImmRange<1, 1>;
@@ -904,65 +873,35 @@ def Imm0_15Operand : AsmImmRange<0, 15>;
904873def Imm0_31Operand : AsmImmRange<0, 31>;
905874def Imm0_63Operand : AsmImmRange<0, 63>;
906875
907- def vecshiftL8 : Operand<i32>, ImmLeaf <i32, [{
876+ def vecshiftL8 : Operand<i32>, TImmLeaf <i32, [{
908877 return (((uint32_t)Imm) < 8);
909878}]> {
910879 let EncoderMethod = "getVecShiftL8OpValue";
911880 let DecoderMethod = "DecodeVecShiftL8Imm";
912881 let ParserMatchClass = Imm0_7Operand;
913882}
914- def vecshiftL16 : Operand<i32>, ImmLeaf <i32, [{
883+ def vecshiftL16 : Operand<i32>, TImmLeaf <i32, [{
915884 return (((uint32_t)Imm) < 16);
916885}]> {
917886 let EncoderMethod = "getVecShiftL16OpValue";
918887 let DecoderMethod = "DecodeVecShiftL16Imm";
919888 let ParserMatchClass = Imm0_15Operand;
920889}
921- def vecshiftL32 : Operand<i32>, ImmLeaf <i32, [{
890+ def vecshiftL32 : Operand<i32>, TImmLeaf <i32, [{
922891 return (((uint32_t)Imm) < 32);
923892}]> {
924893 let EncoderMethod = "getVecShiftL32OpValue";
925894 let DecoderMethod = "DecodeVecShiftL32Imm";
926895 let ParserMatchClass = Imm0_31Operand;
927896}
928- def vecshiftL64 : Operand<i32>, ImmLeaf <i32, [{
897+ def vecshiftL64 : Operand<i32>, TImmLeaf <i32, [{
929898 return (((uint32_t)Imm) < 64);
930899}]> {
931900 let EncoderMethod = "getVecShiftL64OpValue";
932901 let DecoderMethod = "DecodeVecShiftL64Imm";
933902 let ParserMatchClass = Imm0_63Operand;
934903}
935904
936- // Same as vecshiftL#N, but use TargetConstant (TimmLeaf) instead of Constant
937- // (ImmLeaf)
938- def tvecshiftL8 : Operand<i32>, TImmLeaf<i32, [{
939- return (((uint32_t)Imm) < 8);
940- }]> {
941- let EncoderMethod = "getVecShiftL8OpValue";
942- let DecoderMethod = "DecodeVecShiftL8Imm";
943- let ParserMatchClass = Imm0_7Operand;
944- }
945- def tvecshiftL16 : Operand<i32>, TImmLeaf<i32, [{
946- return (((uint32_t)Imm) < 16);
947- }]> {
948- let EncoderMethod = "getVecShiftL16OpValue";
949- let DecoderMethod = "DecodeVecShiftL16Imm";
950- let ParserMatchClass = Imm0_15Operand;
951- }
952- def tvecshiftL32 : Operand<i32>, TImmLeaf<i32, [{
953- return (((uint32_t)Imm) < 32);
954- }]> {
955- let EncoderMethod = "getVecShiftL32OpValue";
956- let DecoderMethod = "DecodeVecShiftL32Imm";
957- let ParserMatchClass = Imm0_31Operand;
958- }
959- def tvecshiftL64 : Operand<i32>, TImmLeaf<i32, [{
960- return (((uint32_t)Imm) < 64);
961- }]> {
962- let EncoderMethod = "getVecShiftL64OpValue";
963- let DecoderMethod = "DecodeVecShiftL64Imm";
964- let ParserMatchClass = Imm0_63Operand;
965- }
966905
967906// Crazy immediate formats used by 32-bit and 64-bit logical immediate
968907// instructions for splatting repeating bit patterns across the immediate.
@@ -10232,39 +10171,40 @@ multiclass SIMDVectorRShiftSD<bit U, bits<5> opc, string asm,
1023210171 def v4i16_shift : BaseSIMDVectorShift<0, U, opc, {0,0,1,?,?,?,?},
1023310172 V64, V64, vecshiftR16,
1023410173 asm, ".4h", ".4h",
10235- [(set (v4i16 V64:$Rd), (OpNode (v4f16 V64:$Rn), (i32 imm :$imm)))]> {
10174+ [(set (v4i16 V64:$Rd), (OpNode (v4f16 V64:$Rn), (i32 vecshiftR16 :$imm)))]> {
1023610175 bits<4> imm;
1023710176 let Inst{19-16} = imm;
1023810177 }
1023910178
1024010179 def v8i16_shift : BaseSIMDVectorShift<1, U, opc, {0,0,1,?,?,?,?},
1024110180 V128, V128, vecshiftR16,
1024210181 asm, ".8h", ".8h",
10243- [(set (v8i16 V128:$Rd), (OpNode (v8f16 V128:$Rn), (i32 imm :$imm)))]> {
10182+ [(set (v8i16 V128:$Rd), (OpNode (v8f16 V128:$Rn), (i32 vecshiftR16 :$imm)))]> {
1024410183 bits<4> imm;
1024510184 let Inst{19-16} = imm;
1024610185 }
1024710186 } // Predicates = [HasNEON, HasFullFP16]
10187+
1024810188 def v2i32_shift : BaseSIMDVectorShift<0, U, opc, {0,1,?,?,?,?,?},
1024910189 V64, V64, vecshiftR32,
1025010190 asm, ".2s", ".2s",
10251- [(set (v2i32 V64:$Rd), (OpNode (v2f32 V64:$Rn), (i32 imm :$imm)))]> {
10191+ [(set (v2i32 V64:$Rd), (OpNode (v2f32 V64:$Rn), (i32 vecshiftR32 :$imm)))]> {
1025210192 bits<5> imm;
1025310193 let Inst{20-16} = imm;
1025410194 }
1025510195
1025610196 def v4i32_shift : BaseSIMDVectorShift<1, U, opc, {0,1,?,?,?,?,?},
1025710197 V128, V128, vecshiftR32,
1025810198 asm, ".4s", ".4s",
10259- [(set (v4i32 V128:$Rd), (OpNode (v4f32 V128:$Rn), (i32 imm :$imm)))]> {
10199+ [(set (v4i32 V128:$Rd), (OpNode (v4f32 V128:$Rn), (i32 vecshiftR32 :$imm)))]> {
1026010200 bits<5> imm;
1026110201 let Inst{20-16} = imm;
1026210202 }
1026310203
1026410204 def v2i64_shift : BaseSIMDVectorShift<1, U, opc, {1,?,?,?,?,?,?},
1026510205 V128, V128, vecshiftR64,
1026610206 asm, ".2d", ".2d",
10267- [(set (v2i64 V128:$Rd), (OpNode (v2f64 V128:$Rn), (i32 imm :$imm)))]> {
10207+ [(set (v2i64 V128:$Rd), (OpNode (v2f64 V128:$Rn), (i32 vecshiftR64 :$imm)))]> {
1026810208 bits<6> imm;
1026910209 let Inst{21-16} = imm;
1027010210 }
@@ -10276,15 +10216,15 @@ multiclass SIMDVectorRShiftToFP<bit U, bits<5> opc, string asm,
1027610216 def v4i16_shift : BaseSIMDVectorShift<0, U, opc, {0,0,1,?,?,?,?},
1027710217 V64, V64, vecshiftR16,
1027810218 asm, ".4h", ".4h",
10279- [(set (v4f16 V64:$Rd), (OpNode (v4i16 V64:$Rn), (i32 imm :$imm)))]> {
10219+ [(set (v4f16 V64:$Rd), (OpNode (v4i16 V64:$Rn), (i32 vecshiftR16 :$imm)))]> {
1028010220 bits<4> imm;
1028110221 let Inst{19-16} = imm;
1028210222 }
1028310223
1028410224 def v8i16_shift : BaseSIMDVectorShift<1, U, opc, {0,0,1,?,?,?,?},
1028510225 V128, V128, vecshiftR16,
1028610226 asm, ".8h", ".8h",
10287- [(set (v8f16 V128:$Rd), (OpNode (v8i16 V128:$Rn), (i32 imm :$imm)))]> {
10227+ [(set (v8f16 V128:$Rd), (OpNode (v8i16 V128:$Rn), (i32 vecshiftR16 :$imm)))]> {
1028810228 bits<4> imm;
1028910229 let Inst{19-16} = imm;
1029010230 }
@@ -10293,23 +10233,23 @@ multiclass SIMDVectorRShiftToFP<bit U, bits<5> opc, string asm,
1029310233 def v2i32_shift : BaseSIMDVectorShift<0, U, opc, {0,1,?,?,?,?,?},
1029410234 V64, V64, vecshiftR32,
1029510235 asm, ".2s", ".2s",
10296- [(set (v2f32 V64:$Rd), (OpNode (v2i32 V64:$Rn), (i32 imm :$imm)))]> {
10236+ [(set (v2f32 V64:$Rd), (OpNode (v2i32 V64:$Rn), (i32 vecshiftR32 :$imm)))]> {
1029710237 bits<5> imm;
1029810238 let Inst{20-16} = imm;
1029910239 }
1030010240
1030110241 def v4i32_shift : BaseSIMDVectorShift<1, U, opc, {0,1,?,?,?,?,?},
1030210242 V128, V128, vecshiftR32,
1030310243 asm, ".4s", ".4s",
10304- [(set (v4f32 V128:$Rd), (OpNode (v4i32 V128:$Rn), (i32 imm :$imm)))]> {
10244+ [(set (v4f32 V128:$Rd), (OpNode (v4i32 V128:$Rn), (i32 vecshiftR32 :$imm)))]> {
1030510245 bits<5> imm;
1030610246 let Inst{20-16} = imm;
1030710247 }
1030810248
1030910249 def v2i64_shift : BaseSIMDVectorShift<1, U, opc, {1,?,?,?,?,?,?},
1031010250 V128, V128, vecshiftR64,
1031110251 asm, ".2d", ".2d",
10312- [(set (v2f64 V128:$Rd), (OpNode (v2i64 V128:$Rn), (i32 imm :$imm)))]> {
10252+ [(set (v2f64 V128:$Rd), (OpNode (v2i64 V128:$Rn), (i32 vecshiftR64 :$imm)))]> {
1031310253 bits<6> imm;
1031410254 let Inst{21-16} = imm;
1031510255 }
0 commit comments