Skip to content

Commit 187124a

Browse files
committed
minor cleanups, code comments
1 parent 573a2d1 commit 187124a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llvm/lib/Target/AMDGPU/SIInstructions.td

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,9 @@ def : GCNPat<
791791
(SI_CALL_ISEL $src0, (i64 0))
792792
>;
793793

794-
// Handle fshr with uniform inputs to map to scalar instructions
794+
// Funnel shift right (fshr) patterns for uniform inputs.
795+
// These patterns implement this using scalar instructions by constructing a 64-bit
796+
// value {a, b} and performing a single right shift.
795797
def : GCNPat<(UniformTernaryFrag<fshr> i32:$src0, i32:$src1, i32:$src2),
796798
(i32 (EXTRACT_SUBREG (S_LSHR_B64 (REG_SEQUENCE SReg_64, $src1, sub0, $src0, sub1), (S_AND_B32 $src2, (i32 31))), sub0))
797799
>;
@@ -2709,7 +2711,6 @@ def : GCNPat<(fshr i32:$src0, i32:$src1, i32:$src2),
27092711
/* src2_modifiers */ 0,
27102712
$src2, /* clamp */ 0, /* op_sel */ 0)
27112713
>;
2712-
27132714
} // isGFX9GFX10
27142715
} // end True16Predicate = NotHasTrue16BitInsts
27152716

@@ -2738,7 +2739,6 @@ def : GCNPat<(fshr i32:$src0, i32:$src1, i32:$src2),
27382739
/* src2_modifiers */ 0,
27392740
(EXTRACT_SUBREG VGPR_32:$src2, lo16),
27402741
/* clamp */ 0, /* op_sel */ 0)>;
2741-
27422742
} // end True16Predicate = UseRealTrue16Insts
27432743

27442744
let True16Predicate = UseFakeTrue16Insts in {
@@ -2774,7 +2774,6 @@ def : GCNPat<(fshr i32:$src0, i32:$src1, i32:$src2),
27742774
/* src2_modifiers */ 0,
27752775
$src2, /* clamp */ 0, /* op_sel */ 0)
27762776
>;
2777-
27782777
} // end True16Predicate = UseFakeTrue16Insts
27792778

27802779
/********** ====================== **********/
@@ -3863,7 +3862,6 @@ class PackB32Pat<Instruction inst> : GCNPat <
38633862
(inst $src0_mods, VGPR_32:$src0, $src1_mods, VGPR_32:$src1)
38643863
>;
38653864
}
3866-
38673865
let SubtargetPredicate = isGFX9Plus in {
38683866
let True16Predicate = NotHasTrue16BitInsts in
38693867
def : PackB32Pat<V_PACK_B32_F16_e64>;

0 commit comments

Comments
 (0)