Skip to content

Commit 21704a6

Browse files
authored
[AMDGPU] Fix printing hasInitWholeWave in mir (#123232)
1 parent 437834e commit 21704a6

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ yaml::SIMachineFunctionInfo::SIMachineFunctionInfo(
715715
ArgInfo(convertArgumentInfo(MFI.getArgInfo(), TRI)),
716716
PSInputAddr(MFI.getPSInputAddr()), PSInputEnable(MFI.getPSInputEnable()),
717717
MaxMemoryClusterDWords(MFI.getMaxMemoryClusterDWords()),
718-
Mode(MFI.getMode()) {
718+
Mode(MFI.getMode()), HasInitWholeWave(MFI.hasInitWholeWave()) {
719719
for (Register Reg : MFI.getSGPRSpillPhysVGPRs())
720720
SpillPhysVGPRS.push_back(regToString(Reg, TRI));
721721

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
; RUN: llc -global-isel=0 -march=amdgcn -mcpu=gfx1100 -stop-after=finalize-isel < %s | FileCheck --check-prefix=GCN %s
2+
; RUN: llc -global-isel=1 -march=amdgcn -mcpu=gfx1100 -stop-after=finalize-isel < %s | FileCheck --check-prefix=GCN %s
3+
4+
; GCN-LABEL: name: init_wwm
5+
; GCN: hasInitWholeWave: true
6+
define void @init_wwm(ptr addrspace(1) inreg %p) {
7+
entry:
8+
%entry_exec = call i1 @llvm.amdgcn.init.whole.wave()
9+
br i1 %entry_exec, label %bb.1, label %bb.2
10+
11+
bb.1:
12+
store i32 1, ptr addrspace(1) %p
13+
br label %bb.2
14+
15+
bb.2:
16+
ret void
17+
}

0 commit comments

Comments
 (0)