From 768e6faba8fa5eef04276a51836a40c5ab8013bc Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Wed, 16 Feb 2022 16:41:45 +0000 Subject: [PATCH] [AMDGPU] Return better Changed status from SILowerControlFlow Differential Revision: https://reviews.llvm.org/D120025 --- llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp b/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp index e1018bd..4bb05d9 100644 --- a/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp +++ b/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp @@ -865,6 +865,7 @@ bool SILowerControlFlow::runOnMachineFunction(MachineFunction &MF) { } } + bool Changed = false; MachineFunction::iterator NextBB; for (MachineFunction::iterator BI = MF.begin(); BI != MF.end(); BI = NextBB) { @@ -886,6 +887,7 @@ bool SILowerControlFlow::runOnMachineFunction(MachineFunction &MF) { case AMDGPU::SI_LOOP: case AMDGPU::SI_END_CF: SplitMBB = process(MI); + Changed = true; break; // FIXME: find a better place for this @@ -894,6 +896,7 @@ bool SILowerControlFlow::runOnMachineFunction(MachineFunction &MF) { lowerInitExec(MBB, MI); if (LIS) LIS->removeAllRegUnitsForPhysReg(AMDGPU::EXEC); + Changed = true; break; default: @@ -913,5 +916,5 @@ bool SILowerControlFlow::runOnMachineFunction(MachineFunction &MF) { LoweredIf.clear(); KillBlocks.clear(); - return true; + return Changed; } -- 2.7.4