Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit d71fa76

Browse files
committed
Revert "[AMDGPU] Emit S_CBRANCH_SCC for floating-point conditions. (llvm#120588)"
This reverts commit d3508cc. Change-Id: Idc3b9497c81779055fe226a2705bcbe25cd70889
1 parent 9f89bd0 commit d71fa76

File tree

3 files changed

+4
-104
lines changed

3 files changed

+4
-104
lines changed

llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2394,9 +2394,6 @@ bool AMDGPUDAGToDAGISel::isCBranchSCC(const SDNode *N) const {
23942394
Subtarget->hasScalarCompareEq64();
23952395
}
23962396

2397-
if ((VT == MVT::f16 || VT == MVT::f32) && Subtarget->hasSALUFloatInsts())
2398-
return true;
2399-
24002397
return false;
24012398
}
24022399

llvm/test/CodeGen/AMDGPU/branch-relaxation.ll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,10 @@ define amdgpu_kernel void @uniform_conditional_min_long_forward_vcnd_branch(ptr
297297
; GFX12-NEXT: s_load_b32 s0, s[4:5], 0x2c
298298
; GFX12-NEXT: s_wait_kmcnt 0x0
299299
; GFX12-NEXT: s_cmp_eq_f32 s0, 0
300-
; GFX12-NEXT: s_cbranch_scc0 .LBB2_1
300+
; GFX12-NEXT: s_cselect_b32 s1, -1, 0
301+
; GFX12-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
302+
; GFX12-NEXT: s_and_b32 vcc_lo, exec_lo, s1
303+
; GFX12-NEXT: s_cbranch_vccz .LBB2_1
301304
; GFX12-NEXT: ; %bb.3: ; %bb0
302305
; GFX12-NEXT: s_getpc_b64 s[2:3]
303306
; GFX12-NEXT: .Lpost_getpc2:

llvm/test/CodeGen/AMDGPU/uniform_branch_with_floating_point_cond.ll

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)