11; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2- ; RUN: llc -global-isel -O0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < %s | FileCheck -check-prefix=WAVE64 %s
3- ; RUN: llc -global-isel -O0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1031 < %s | FileCheck -check-prefix=WAVE32 %s
2+ ; RUN: llc -global-isel -new-reg-bank-select - O0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < %s | FileCheck -check-prefix=WAVE64 %s
3+ ; RUN: llc -global-isel -new-reg-bank-select - O0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1031 < %s | FileCheck -check-prefix=WAVE32 %s
44
55; This was mishandling the constant true and false values used as a
66; scalar branch condition.
@@ -76,7 +76,8 @@ define void @br_undef() {
7676; WAVE64-NEXT: .LBB2_1: ; %bb0
7777; WAVE64-NEXT: ; =>This Inner Loop Header: Depth=1
7878; WAVE64-NEXT: ; implicit-def: $sgpr4
79- ; WAVE64-NEXT: s_and_b32 s4, s4, 1
79+ ; WAVE64-NEXT: s_mov_b32 s5, 1
80+ ; WAVE64-NEXT: s_and_b32 s4, s4, s5
8081; WAVE64-NEXT: s_cmp_lg_u32 s4, 0
8182; WAVE64-NEXT: s_cbranch_scc1 .LBB2_1
8283; WAVE64-NEXT: ; %bb.2: ; %.exit5
@@ -88,7 +89,8 @@ define void @br_undef() {
8889; WAVE32-NEXT: .LBB2_1: ; %bb0
8990; WAVE32-NEXT: ; =>This Inner Loop Header: Depth=1
9091; WAVE32-NEXT: ; implicit-def: $sgpr4
91- ; WAVE32-NEXT: s_and_b32 s4, s4, 1
92+ ; WAVE32-NEXT: s_mov_b32 s5, 1
93+ ; WAVE32-NEXT: s_and_b32 s4, s4, s5
9294; WAVE32-NEXT: s_cmp_lg_u32 s4, 0
9395; WAVE32-NEXT: s_cbranch_scc1 .LBB2_1
9496; WAVE32-NEXT: ; %bb.2: ; %.exit5
@@ -110,7 +112,8 @@ define void @br_poison() {
110112; WAVE64-NEXT: .LBB3_1: ; %bb0
111113; WAVE64-NEXT: ; =>This Inner Loop Header: Depth=1
112114; WAVE64-NEXT: ; implicit-def: $sgpr4
113- ; WAVE64-NEXT: s_and_b32 s4, s4, 1
115+ ; WAVE64-NEXT: s_mov_b32 s5, 1
116+ ; WAVE64-NEXT: s_and_b32 s4, s4, s5
114117; WAVE64-NEXT: s_cmp_lg_u32 s4, 0
115118; WAVE64-NEXT: s_cbranch_scc1 .LBB3_1
116119; WAVE64-NEXT: ; %bb.2: ; %.exit5
@@ -122,7 +125,8 @@ define void @br_poison() {
122125; WAVE32-NEXT: .LBB3_1: ; %bb0
123126; WAVE32-NEXT: ; =>This Inner Loop Header: Depth=1
124127; WAVE32-NEXT: ; implicit-def: $sgpr4
125- ; WAVE32-NEXT: s_and_b32 s4, s4, 1
128+ ; WAVE32-NEXT: s_mov_b32 s5, 1
129+ ; WAVE32-NEXT: s_and_b32 s4, s4, s5
126130; WAVE32-NEXT: s_cmp_lg_u32 s4, 0
127131; WAVE32-NEXT: s_cbranch_scc1 .LBB3_1
128132; WAVE32-NEXT: ; %bb.2: ; %.exit5
0 commit comments