@@ -1466,8 +1466,7 @@ class VOPSelectPat_t16 <ValueType vt> : GCNPat <
14661466
14671467def : VOPSelectModsPat <i32>;
14681468def : VOPSelectModsPat <f32>;
1469- foreach p = [NotHasTrue16BitInsts, UseFakeTrue16Insts] in
1470- let True16Predicate = p in {
1469+ let True16Predicate = NotUseRealTrue16Insts in {
14711470 def : VOPSelectPat <f16>;
14721471 def : VOPSelectPat <i16>;
14731472} // End True16Predicate = p
@@ -2137,8 +2136,7 @@ def : GCNPat <
21372136>;
21382137
21392138foreach fp16vt = [f16, bf16] in {
2140- foreach p = [NotHasTrue16BitInsts, UseFakeTrue16Insts] in
2141- let SubtargetPredicate = p in {
2139+ let SubtargetPredicate = NotUseRealTrue16Insts in {
21422140def : GCNPat <
21432141 (fabs (fp16vt VGPR_32:$src)),
21442142 (V_AND_B32_e64 (S_MOV_B32 (i32 0x00007fff)), VGPR_32:$src)
@@ -2230,8 +2228,7 @@ def : GCNPat <
22302228}
22312229
22322230foreach fp16vt = [f16, bf16] in {
2233- foreach p = [NotHasTrue16BitInsts, UseFakeTrue16Insts] in
2234- let True16Predicate = p in {
2231+ let True16Predicate = NotUseRealTrue16Insts in {
22352232def : GCNPat <
22362233 (fcopysign fp16vt:$src0, fp16vt:$src1),
22372234 (V_BFI_B32_e64 (S_MOV_B32 (i32 0x00007fff)), $src0, $src1)
@@ -2354,23 +2351,21 @@ def : GCNPat <
23542351 (S_MOV_B32 $ga)
23552352>;
23562353
2357- foreach pred = [NotHasTrue16BitInsts, UseFakeTrue16Insts] in {
2358- let True16Predicate = pred in {
2359- def : GCNPat <
2360- (VGPRImm<(i16 imm)>:$imm),
2361- (V_MOV_B32_e32 imm:$imm)
2362- >;
2354+ let True16Predicate = NotUseRealTrue16Insts in {
2355+ def : GCNPat <
2356+ (VGPRImm<(i16 imm)>:$imm),
2357+ (V_MOV_B32_e32 imm:$imm)
2358+ >;
23632359
2364- // FIXME: Workaround for ordering issue with peephole optimizer where
2365- // a register class copy interferes with immediate folding. Should
2366- // use s_mov_b32, which can be shrunk to s_movk_i32
2360+ // FIXME: Workaround for ordering issue with peephole optimizer where
2361+ // a register class copy interferes with immediate folding. Should
2362+ // use s_mov_b32, which can be shrunk to s_movk_i32
23672363
2368- foreach vt = [f16, bf16] in {
2369- def : GCNPat <
2370- (VGPRImm<(vt fpimm)>:$imm),
2371- (V_MOV_B32_e32 (vt (bitcast_fpimm_to_i32 $imm)))
2372- >;
2373- }
2364+ foreach vt = [f16, bf16] in {
2365+ def : GCNPat <
2366+ (VGPRImm<(vt fpimm)>:$imm),
2367+ (V_MOV_B32_e32 (vt (bitcast_fpimm_to_i32 $imm)))
2368+ >;
23742369 }
23752370}
23762371
@@ -2859,8 +2854,7 @@ def : GCNPat<
28592854 (i32 (DivergentSextInreg<i1> i32:$src)),
28602855 (V_BFE_I32_e64 i32:$src, (i32 0), (i32 1))>;
28612856
2862- foreach p = [NotHasTrue16BitInsts, UseFakeTrue16Insts] in
2863- let True16Predicate = p in {
2857+ let True16Predicate = NotUseRealTrue16Insts in {
28642858def : GCNPat <
28652859 (i16 (DivergentSextInreg<i1> i16:$src)),
28662860 (V_BFE_I32_e64 $src, (i32 0), (i32 1))
@@ -3205,8 +3199,7 @@ def : GCNPat<
32053199}
32063200} // AddedComplexity = 1
32073201
3208- foreach p = [NotHasTrue16BitInsts, UseFakeTrue16Insts] in
3209- let True16Predicate = p in {
3202+ let True16Predicate = NotUseRealTrue16Insts in {
32103203def : GCNPat<
32113204 (i32 (DivergentUnaryFrag<zext> i16:$src)),
32123205 (V_AND_B32_e64 (S_MOV_B32 (i32 0xffff)), $src)
@@ -3416,8 +3409,7 @@ def : GCNPat <
34163409
34173410// Magic number: 1 | (0 << 8) | (12 << 16) | (12 << 24)
34183411// The 12s emit 0s.
3419- foreach p = [NotHasTrue16BitInsts, UseFakeTrue16Insts] in
3420- let True16Predicate = p in {
3412+ let True16Predicate = NotUseRealTrue16Insts in {
34213413def : GCNPat <
34223414 (i16 (bswap i16:$a)),
34233415 (V_PERM_B32_e64 (i32 0), VSrc_b32:$a, (S_MOV_B32 (i32 0x0c0c0001)))
@@ -3670,8 +3662,7 @@ def : GCNPat <
36703662 (S_LSHL_B32 SReg_32:$src1, (i16 16))
36713663>;
36723664
3673- foreach p = [NotHasTrue16BitInsts, UseFakeTrue16Insts] in
3674- let True16Predicate = p in {
3665+ let True16Predicate = NotUseRealTrue16Insts in {
36753666def : GCNPat <
36763667 (v2i16 (DivergentBinFrag<build_vector> (i16 0), (i16 VGPR_32:$src1))),
36773668 (v2i16 (V_LSHLREV_B32_e64 (i16 16), VGPR_32:$src1))
@@ -3707,8 +3698,7 @@ def : GCNPat <
37073698 (COPY_TO_REGCLASS SReg_32:$src0, SReg_32)
37083699>;
37093700
3710- foreach p = [NotHasTrue16BitInsts, UseFakeTrue16Insts] in
3711- let True16Predicate = p in {
3701+ let True16Predicate = NotUseRealTrue16Insts in {
37123702def : GCNPat <
37133703 (vecTy (DivergentBinFrag<build_vector> (Ty VGPR_32:$src0), (Ty undef))),
37143704 (COPY_TO_REGCLASS VGPR_32:$src0, VGPR_32)
@@ -3735,8 +3725,7 @@ def : GCNPat <
37353725>;
37363726
37373727let SubtargetPredicate = HasVOP3PInsts in {
3738- foreach p = [NotHasTrue16BitInsts, UseFakeTrue16Insts] in
3739- let True16Predicate = p in
3728+ let True16Predicate = NotUseRealTrue16Insts in
37403729def : GCNPat <
37413730 (v2i16 (DivergentBinFrag<build_vector> (i16 VGPR_32:$src0), (i16 VGPR_32:$src1))),
37423731 (v2i16 (V_LSHL_OR_B32_e64 $src1, (i32 16), (i32 (V_AND_B32_e64 (i32 (V_MOV_B32_e32 (i32 0xffff))), $src0))))
@@ -3766,8 +3755,7 @@ def : GCNPat <
37663755 (S_PACK_LL_B32_B16 SReg_32:$src0, SReg_32:$src1)
37673756>;
37683757
3769- foreach p = [NotHasTrue16BitInsts, UseFakeTrue16Insts] in
3770- let True16Predicate = p in {
3758+ let True16Predicate = NotUseRealTrue16Insts in {
37713759// Take the lower 16 bits from each VGPR_32 and concat them
37723760def : GCNPat <
37733761 (vecTy (DivergentBinFrag<build_vector> (Ty VGPR_32:$a), (Ty VGPR_32:$b))),
@@ -3838,8 +3826,7 @@ def : GCNPat <
38383826>;
38393827
38403828// Take the upper 16 bits from each VGPR_32 and concat them
3841- foreach p = [NotHasTrue16BitInsts, UseFakeTrue16Insts] in
3842- let True16Predicate = p in
3829+ let True16Predicate = NotUseRealTrue16Insts in
38433830def : GCNPat <
38443831 (vecTy (DivergentBinFrag<build_vector>
38453832 (Ty !if(!eq(Ty, i16),
@@ -3881,8 +3868,7 @@ def : GCNPat <
38813868 (v2i16 (S_PACK_HL_B32_B16 SReg_32:$src0, SReg_32:$src1))
38823869>;
38833870
3884- foreach p = [NotHasTrue16BitInsts, UseFakeTrue16Insts] in
3885- let True16Predicate = p in {
3871+ let True16Predicate = NotUseRealTrue16Insts in {
38863872def : GCNPat <
38873873 (v2f16 (scalar_to_vector f16:$src0)),
38883874 (COPY $src0)
0 commit comments