@@ -319,11 +319,21 @@ let SchedRW = [Write64Bit] in {
319
319
} // End SchedRW = [Write64Bit]
320
320
} // End isReMaterializable = 1
321
321
322
+ foreach p = [NotHasTrue16BitInsts, UseFakeTrue16Insts] in
323
+ let True16Predicate = p in
322
324
def : GCNPat<
323
325
(i32 (DivergentUnaryFrag<sext> i16:$src)),
324
326
(i32 (V_BFE_I32_e64 i16:$src, (i32 0), (i32 0x10)))
325
327
>;
326
328
329
+ let True16Predicate = UseRealTrue16Insts in
330
+ def : GCNPat<
331
+ (i32 (DivergentUnaryFrag<sext> i16:$src)),
332
+ (i32 (V_BFE_I32_e64
333
+ (REG_SEQUENCE VGPR_32, VGPR_16:$src, lo16, (i16 (IMPLICIT_DEF)), hi16),
334
+ (i32 0), (i32 0x10)))
335
+ >;
336
+
327
337
let isReMaterializable = 1 in {
328
338
let SubtargetPredicate = isGFX6GFX7GFX10Plus in {
329
339
defm V_MULLIT_F32 : VOP3Inst <"v_mullit_f32", VOP3_Profile<VOP_F32_F32_F32_F32>>;
@@ -423,6 +433,8 @@ def V_INTERP_P1LV_F16 : VOP3Interp <"v_interp_p1lv_f16", VOP3_INTERP16<[f32, f32
423
433
424
434
} // End SubtargetPredicate = Has16BitInsts, isCommutable = 1
425
435
436
+ foreach p = [NotHasTrue16BitInsts, UseFakeTrue16Insts] in
437
+ let True16Predicate = p in
426
438
def : GCNPat<
427
439
(i64 (DivergentUnaryFrag<sext> i16:$src)),
428
440
(REG_SEQUENCE VReg_64,
@@ -432,6 +444,18 @@ def : GCNPat<
432
444
), VGPR_32)), sub1)
433
445
>;
434
446
447
+ let True16Predicate = UseRealTrue16Insts in
448
+ def : GCNPat<
449
+ (i64 (DivergentUnaryFrag<sext> i16:$src)),
450
+ (REG_SEQUENCE VReg_64,
451
+ (i32 (V_BFE_I32_e64
452
+ (REG_SEQUENCE VGPR_32, VGPR_16:$src, lo16, (i16 (IMPLICIT_DEF)), hi16),
453
+ (S_MOV_B32 (i32 0)), (S_MOV_B32 (i32 0x10)))), sub0,
454
+ (i32 (COPY_TO_REGCLASS
455
+ (V_ASHRREV_I32_e32 (S_MOV_B32 (i32 0x1f)), (i32 (V_BFE_I32_e64 $src, (S_MOV_B32 (i32 0)), (S_MOV_B32 (i32 0x10))))
456
+ ), VGPR_32)), sub1)
457
+ >;
458
+
435
459
let SubtargetPredicate = isGFX8Plus, Uses = [MODE, M0, EXEC], OtherPredicates = [isNotGFX90APlus] in {
436
460
def V_INTERP_P1_F32_e64 : VOP3Interp <"v_interp_p1_f32", VOP3_INTERP>;
437
461
def V_INTERP_P2_F32_e64 : VOP3Interp <"v_interp_p2_f32", VOP3_INTERP>;
0 commit comments