Skip to content

Commit 5eadc3d

Browse files
Konstantina MitropoulouKonstantina Mitropoulou
authored andcommitted
[AMDGPU] Always emit SI_KILL_I1_PSEUDO for uniform floating point branches.
1 parent a20f999 commit 5eadc3d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

llvm/lib/Target/AMDGPU/AMDGPU.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2498,6 +2498,9 @@ def HasNotMADIntraFwdBug : Predicate<"!Subtarget->hasMADIntraFwdBug()">;
24982498
def HasSALUFloatInsts : Predicate<"Subtarget->hasSALUFloatInsts()">,
24992499
AssemblerPredicate<(all_of FeatureSALUFloatInsts)>;
25002500

2501+
def NotHasSALUFloatInsts : Predicate<"!Subtarget->hasSALUFloatInsts()">,
2502+
AssemblerPredicate<(all_of (not FeatureSALUFloatInsts))>;
2503+
25012504
def HasPseudoScalarTrans : Predicate<"Subtarget->hasPseudoScalarTrans()">,
25022505
AssemblerPredicate<(all_of FeaturePseudoScalarTrans)>;
25032506

llvm/lib/Target/AMDGPU/SIInstructions.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,6 +1063,7 @@ def : GCNPat <
10631063
(SI_KILL_I1_PSEUDO SCSrc_i1:$src, -1)
10641064
>;
10651065

1066+
let SubtargetPredicate = NotHasSALUFloatInsts in
10661067
def : GCNPat <
10671068
(int_amdgcn_kill (i1 (setcc f32:$src, InlineImmFP32:$imm, cond:$cond))),
10681069
(SI_KILL_F32_COND_IMM_PSEUDO VSrc_b32:$src, (bitcast_fpimm_to_i32 $imm), (cond_as_i32imm $cond))

0 commit comments

Comments
 (0)