Skip to content

Commit 9f789fb

Browse files
committed
WIP: AMDGPU: Use MFPropsModifier modifier in SIFoldOperands
This doesn't appear to work. I do not get an error in the new PM.
1 parent a44284c commit 9f789fb

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

llvm/lib/Target/AMDGPU/SIFoldOperands.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2311,6 +2311,8 @@ bool SIFoldOperandsImpl::tryOptimizeAGPRPhis(MachineBasicBlock &MBB) {
23112311
}
23122312

23132313
bool SIFoldOperandsImpl::run(MachineFunction &MF) {
2314+
MFPropsModifier _(*this, MF);
2315+
23142316
MRI = &MF.getRegInfo();
23152317
ST = &MF.getSubtarget<GCNSubtarget>();
23162318
TII = ST->getInstrInfo();
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# RUN: not --crash llc -mtriple=amdgcn -mcpu=gfx900 -run-pass=si-fold-operands -filetype=null %s 2>&1 | FileCheck -check-prefix=ERR %s
2+
# RUN: not --crash llc -mtriple=amdgcn -mcpu=gfx900 -passes=si-fold-operands -filetype=null %s 2>&1 | FileCheck -check-prefix=ERR %s
3+
4+
# ERR: MachineFunctionProperties required by SI Fold Operands pass are not met by function not_ssa.
5+
# ERR-NEXT: Required properties: IsSSA
6+
# ERR-NEXT: Current properties: NoPHIs
7+
---
8+
name: not_ssa
9+
body: |
10+
bb.0:
11+
liveins: $vgpr0, $vgpr1
12+
%0:vgpr_32 = COPY $vgpr0
13+
%0:vgpr_32 = COPY $vgpr1
14+
15+
...

0 commit comments

Comments
 (0)