@@ -744,19 +744,19 @@ def S_NOR_B64 : SOP2_64 <"s_nor_b64",
744
744
745
745
// There are also separate patterns for types other than i32
746
746
def S_ANDN2_B32 : SOP2_32 <"s_andn2_b32",
747
- [(set i32:$sdst, (UniformBinFrag<and> i32:$src0, (UniformUnaryFrag< not> i32:$src1)))]
747
+ [(set i32:$sdst, (UniformBinFrag<and> i32:$src0, (not i32:$src1)))]
748
748
>;
749
749
750
750
def S_ANDN2_B64 : SOP2_64 <"s_andn2_b64",
751
- [(set i64:$sdst, (UniformBinFrag<and> i64:$src0, (UniformUnaryFrag< not> i64:$src1)))]
751
+ [(set i64:$sdst, (UniformBinFrag<and> i64:$src0, (not i64:$src1)))]
752
752
>;
753
753
754
754
def S_ORN2_B32 : SOP2_32 <"s_orn2_b32",
755
- [(set i32:$sdst, (UniformBinFrag<or> i32:$src0, (UniformUnaryFrag< not> i32:$src1)))]
755
+ [(set i32:$sdst, (UniformBinFrag<or> i32:$src0, (not i32:$src1)))]
756
756
>;
757
757
758
758
def S_ORN2_B64 : SOP2_64 <"s_orn2_b64",
759
- [(set i64:$sdst, (UniformBinFrag<or> i64:$src0, (UniformUnaryFrag< not> i64:$src1)))]
759
+ [(set i64:$sdst, (UniformBinFrag<or> i64:$src0, (not i64:$src1)))]
760
760
>;
761
761
} // End Defs = [SCC]
762
762
@@ -1905,21 +1905,20 @@ def : GCNPat<
1905
1905
(S_AND_B32 (S_MOV_B32 (i32 0xffff)), $src)
1906
1906
>;
1907
1907
1908
- // FIXME: ValueType should have isVector field
1909
1908
class ScalarNot2Pat<Instruction inst, SDPatternOperator op, ValueType vt,
1910
- bit isVector = 1 > : GCNPat<
1911
- (UniformBinFrag<op> vt:$src0, (UniformUnaryFrag<!if(isVector, vnot, not)> vt:$src1)),
1909
+ SDPatternOperator notnode = !if(vt.isVector, vnot, not) > : GCNPat<
1910
+ (UniformBinFrag<op> vt:$src0, (notnode vt:$src1)),
1912
1911
(inst getSOPSrcForVT<vt>.ret:$src0, getSOPSrcForVT<vt>.ret:$src1)
1913
1912
>;
1914
1913
1915
1914
// Match these for some more types
1916
1915
// TODO: i1
1917
- def : ScalarNot2Pat<S_ANDN2_B32, and, i16, 0 >;
1916
+ def : ScalarNot2Pat<S_ANDN2_B32, and, i16>;
1918
1917
def : ScalarNot2Pat<S_ANDN2_B32, and, v2i16>;
1919
1918
def : ScalarNot2Pat<S_ANDN2_B64, and, v4i16>;
1920
1919
def : ScalarNot2Pat<S_ANDN2_B64, and, v2i32>;
1921
1920
1922
- def : ScalarNot2Pat<S_ORN2_B32, or, i16, 0 >;
1921
+ def : ScalarNot2Pat<S_ORN2_B32, or, i16>;
1923
1922
def : ScalarNot2Pat<S_ORN2_B32, or, v2i16>;
1924
1923
def : ScalarNot2Pat<S_ORN2_B64, or, v4i16>;
1925
1924
def : ScalarNot2Pat<S_ORN2_B64, or, v2i32>;
0 commit comments