Skip to content

Commit 0c69d04

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 12b38c3 commit 0c69d04

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
@@ -2334,6 +2334,8 @@ bool SIFoldOperandsImpl::tryOptimizeAGPRPhis(MachineBasicBlock &MBB) {
23342334
}
23352335

23362336
bool SIFoldOperandsImpl::run(MachineFunction &MF) {
2337+
MFPropsModifier _(*this, MF);
2338+
23372339
MRI = &MF.getRegInfo();
23382340
ST = &MF.getSubtarget<GCNSubtarget>();
23392341
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)