Skip to content

Commit f75d75b

Browse files
arsenmoptimisan
andauthored
AMDGPU: Use MFPropsModifier modifier in SIFoldOperands (#127752)
This doesn't appear to work. I do not get an error in the new PM. --------- Co-authored-by: Akshat Oke <[email protected]>
1 parent 8a1b4d0 commit f75d75b

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

llvm/lib/Target/AMDGPU/SIFoldOperands.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2496,6 +2496,8 @@ bool SIFoldOperandsImpl::run(MachineFunction &MF) {
24962496

24972497
PreservedAnalyses SIFoldOperandsPass::run(MachineFunction &MF,
24982498
MachineFunctionAnalysisManager &) {
2499+
MFPropsModifier _(*this, MF);
2500+
24992501
bool Changed = SIFoldOperandsImpl().run(MF);
25002502
if (!Changed) {
25012503
return PreservedAnalyses::all();
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# RUN: not --crash llc -mtriple=amdgcn -mcpu=gfx900 -run-pass=si-fold-operands -filetype=null %s 2>&1 | FileCheck -check-prefixes=ERR-LEGACY,ERR %s
2+
# RUN: not --crash llc -mtriple=amdgcn -mcpu=gfx900 -passes=si-fold-operands -filetype=null %s 2>&1 | FileCheck -check-prefixes=ERR-NPM,ERR %s
3+
4+
# ERR-LEGACY: MachineFunctionProperties required by SI Fold Operands pass are not met by function not_ssa.
5+
# ERR-NPM: MachineFunctionProperties required by SIFoldOperandsPass pass are not met by function not_ssa.
6+
# ERR-NEXT: Required properties: IsSSA
7+
# ERR-NEXT: Current properties: NoPHIs
8+
---
9+
name: not_ssa
10+
body: |
11+
bb.0:
12+
liveins: $vgpr0, $vgpr1
13+
%0:vgpr_32 = COPY $vgpr0
14+
%0:vgpr_32 = COPY $vgpr1
15+
16+
...

0 commit comments

Comments
 (0)