@@ -812,87 +812,56 @@ def fixedpoint_recip_f16_i64 : fixedpoint_recip_i64<f16>;
812
812
def fixedpoint_recip_f32_i64 : fixedpoint_recip_i64<f32>;
813
813
def fixedpoint_recip_f64_i64 : fixedpoint_recip_i64<f64>;
814
814
815
- def vecshiftR8 : Operand<i32>, ImmLeaf <i32, [{
815
+ def vecshiftR8 : Operand<i32>, TImmLeaf <i32, [{
816
816
return (((uint32_t)Imm) > 0) && (((uint32_t)Imm) < 9);
817
817
}]> {
818
818
let EncoderMethod = "getVecShiftR8OpValue";
819
819
let DecoderMethod = "DecodeVecShiftR8Imm";
820
820
let ParserMatchClass = Imm1_8Operand;
821
821
}
822
- def vecshiftR16 : Operand<i32>, ImmLeaf <i32, [{
822
+ def vecshiftR16 : Operand<i32>, TImmLeaf <i32, [{
823
823
return (((uint32_t)Imm) > 0) && (((uint32_t)Imm) < 17);
824
824
}]> {
825
825
let EncoderMethod = "getVecShiftR16OpValue";
826
826
let DecoderMethod = "DecodeVecShiftR16Imm";
827
827
let ParserMatchClass = Imm1_16Operand;
828
828
}
829
- def vecshiftR16Narrow : Operand<i32>, ImmLeaf <i32, [{
829
+ def vecshiftR16Narrow : Operand<i32>, TImmLeaf <i32, [{
830
830
return (((uint32_t)Imm) > 0) && (((uint32_t)Imm) < 9);
831
831
}]> {
832
832
let EncoderMethod = "getVecShiftR16OpValue";
833
833
let DecoderMethod = "DecodeVecShiftR16ImmNarrow";
834
834
let ParserMatchClass = Imm1_8Operand;
835
835
}
836
- def vecshiftR32 : Operand<i32>, ImmLeaf <i32, [{
836
+ def vecshiftR32 : Operand<i32>, TImmLeaf <i32, [{
837
837
return (((uint32_t)Imm) > 0) && (((uint32_t)Imm) < 33);
838
838
}]> {
839
839
let EncoderMethod = "getVecShiftR32OpValue";
840
840
let DecoderMethod = "DecodeVecShiftR32Imm";
841
841
let ParserMatchClass = Imm1_32Operand;
842
842
}
843
- def vecshiftR32Narrow : Operand<i32>, ImmLeaf <i32, [{
843
+ def vecshiftR32Narrow : Operand<i32>, TImmLeaf <i32, [{
844
844
return (((uint32_t)Imm) > 0) && (((uint32_t)Imm) < 17);
845
845
}]> {
846
846
let EncoderMethod = "getVecShiftR32OpValue";
847
847
let DecoderMethod = "DecodeVecShiftR32ImmNarrow";
848
848
let ParserMatchClass = Imm1_16Operand;
849
849
}
850
- def vecshiftR64 : Operand<i32>, ImmLeaf <i32, [{
850
+ def vecshiftR64 : Operand<i32>, TImmLeaf <i32, [{
851
851
return (((uint32_t)Imm) > 0) && (((uint32_t)Imm) < 65);
852
852
}]> {
853
853
let EncoderMethod = "getVecShiftR64OpValue";
854
854
let DecoderMethod = "DecodeVecShiftR64Imm";
855
855
let ParserMatchClass = Imm1_64Operand;
856
856
}
857
- def vecshiftR64Narrow : Operand<i32>, ImmLeaf <i32, [{
857
+ def vecshiftR64Narrow : Operand<i32>, TImmLeaf <i32, [{
858
858
return (((uint32_t)Imm) > 0) && (((uint32_t)Imm) < 33);
859
859
}]> {
860
860
let EncoderMethod = "getVecShiftR64OpValue";
861
861
let DecoderMethod = "DecodeVecShiftR64ImmNarrow";
862
862
let ParserMatchClass = Imm1_32Operand;
863
863
}
864
864
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
-
896
865
def Imm0_0Operand : AsmImmRange<0, 0>;
897
866
def Imm0_1Operand : AsmImmRange<0, 1>;
898
867
def Imm1_1Operand : AsmImmRange<1, 1>;
@@ -904,65 +873,35 @@ def Imm0_15Operand : AsmImmRange<0, 15>;
904
873
def Imm0_31Operand : AsmImmRange<0, 31>;
905
874
def Imm0_63Operand : AsmImmRange<0, 63>;
906
875
907
- def vecshiftL8 : Operand<i32>, ImmLeaf <i32, [{
876
+ def vecshiftL8 : Operand<i32>, TImmLeaf <i32, [{
908
877
return (((uint32_t)Imm) < 8);
909
878
}]> {
910
879
let EncoderMethod = "getVecShiftL8OpValue";
911
880
let DecoderMethod = "DecodeVecShiftL8Imm";
912
881
let ParserMatchClass = Imm0_7Operand;
913
882
}
914
- def vecshiftL16 : Operand<i32>, ImmLeaf <i32, [{
883
+ def vecshiftL16 : Operand<i32>, TImmLeaf <i32, [{
915
884
return (((uint32_t)Imm) < 16);
916
885
}]> {
917
886
let EncoderMethod = "getVecShiftL16OpValue";
918
887
let DecoderMethod = "DecodeVecShiftL16Imm";
919
888
let ParserMatchClass = Imm0_15Operand;
920
889
}
921
- def vecshiftL32 : Operand<i32>, ImmLeaf <i32, [{
890
+ def vecshiftL32 : Operand<i32>, TImmLeaf <i32, [{
922
891
return (((uint32_t)Imm) < 32);
923
892
}]> {
924
893
let EncoderMethod = "getVecShiftL32OpValue";
925
894
let DecoderMethod = "DecodeVecShiftL32Imm";
926
895
let ParserMatchClass = Imm0_31Operand;
927
896
}
928
- def vecshiftL64 : Operand<i32>, ImmLeaf <i32, [{
897
+ def vecshiftL64 : Operand<i32>, TImmLeaf <i32, [{
929
898
return (((uint32_t)Imm) < 64);
930
899
}]> {
931
900
let EncoderMethod = "getVecShiftL64OpValue";
932
901
let DecoderMethod = "DecodeVecShiftL64Imm";
933
902
let ParserMatchClass = Imm0_63Operand;
934
903
}
935
904
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
- }
966
905
967
906
// Crazy immediate formats used by 32-bit and 64-bit logical immediate
968
907
// instructions for splatting repeating bit patterns across the immediate.
@@ -10232,39 +10171,40 @@ multiclass SIMDVectorRShiftSD<bit U, bits<5> opc, string asm,
10232
10171
def v4i16_shift : BaseSIMDVectorShift<0, U, opc, {0,0,1,?,?,?,?},
10233
10172
V64, V64, vecshiftR16,
10234
10173
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)))]> {
10236
10175
bits<4> imm;
10237
10176
let Inst{19-16} = imm;
10238
10177
}
10239
10178
10240
10179
def v8i16_shift : BaseSIMDVectorShift<1, U, opc, {0,0,1,?,?,?,?},
10241
10180
V128, V128, vecshiftR16,
10242
10181
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)))]> {
10244
10183
bits<4> imm;
10245
10184
let Inst{19-16} = imm;
10246
10185
}
10247
10186
} // Predicates = [HasNEON, HasFullFP16]
10187
+
10248
10188
def v2i32_shift : BaseSIMDVectorShift<0, U, opc, {0,1,?,?,?,?,?},
10249
10189
V64, V64, vecshiftR32,
10250
10190
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)))]> {
10252
10192
bits<5> imm;
10253
10193
let Inst{20-16} = imm;
10254
10194
}
10255
10195
10256
10196
def v4i32_shift : BaseSIMDVectorShift<1, U, opc, {0,1,?,?,?,?,?},
10257
10197
V128, V128, vecshiftR32,
10258
10198
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)))]> {
10260
10200
bits<5> imm;
10261
10201
let Inst{20-16} = imm;
10262
10202
}
10263
10203
10264
10204
def v2i64_shift : BaseSIMDVectorShift<1, U, opc, {1,?,?,?,?,?,?},
10265
10205
V128, V128, vecshiftR64,
10266
10206
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)))]> {
10268
10208
bits<6> imm;
10269
10209
let Inst{21-16} = imm;
10270
10210
}
@@ -10276,15 +10216,15 @@ multiclass SIMDVectorRShiftToFP<bit U, bits<5> opc, string asm,
10276
10216
def v4i16_shift : BaseSIMDVectorShift<0, U, opc, {0,0,1,?,?,?,?},
10277
10217
V64, V64, vecshiftR16,
10278
10218
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)))]> {
10280
10220
bits<4> imm;
10281
10221
let Inst{19-16} = imm;
10282
10222
}
10283
10223
10284
10224
def v8i16_shift : BaseSIMDVectorShift<1, U, opc, {0,0,1,?,?,?,?},
10285
10225
V128, V128, vecshiftR16,
10286
10226
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)))]> {
10288
10228
bits<4> imm;
10289
10229
let Inst{19-16} = imm;
10290
10230
}
@@ -10293,23 +10233,23 @@ multiclass SIMDVectorRShiftToFP<bit U, bits<5> opc, string asm,
10293
10233
def v2i32_shift : BaseSIMDVectorShift<0, U, opc, {0,1,?,?,?,?,?},
10294
10234
V64, V64, vecshiftR32,
10295
10235
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)))]> {
10297
10237
bits<5> imm;
10298
10238
let Inst{20-16} = imm;
10299
10239
}
10300
10240
10301
10241
def v4i32_shift : BaseSIMDVectorShift<1, U, opc, {0,1,?,?,?,?,?},
10302
10242
V128, V128, vecshiftR32,
10303
10243
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)))]> {
10305
10245
bits<5> imm;
10306
10246
let Inst{20-16} = imm;
10307
10247
}
10308
10248
10309
10249
def v2i64_shift : BaseSIMDVectorShift<1, U, opc, {1,?,?,?,?,?,?},
10310
10250
V128, V128, vecshiftR64,
10311
10251
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)))]> {
10313
10253
bits<6> imm;
10314
10254
let Inst{21-16} = imm;
10315
10255
}
0 commit comments