[llvm] aee1ade - [PowerPC][NFC] add explicit check for ctr loop pseudo expansion.
Chen Zheng via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 19 17:36:59 PST 2022
Author: Chen Zheng
Date: 2022-12-19T20:32:56-05:00
New Revision: aee1adedc8a73653e1bc743a39d3ff2966da7a77
URL: https://github.com/llvm/llvm-project/commit/aee1adedc8a73653e1bc743a39d3ff2966da7a77
DIFF: https://github.com/llvm/llvm-project/commit/aee1adedc8a73653e1bc743a39d3ff2966da7a77.diff
LOG: [PowerPC][NFC] add explicit check for ctr loop pseudo expansion.
Added:
Modified:
llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp b/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
index 68afc5104ec2..5299c0c924b3 100644
--- a/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
+++ b/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
@@ -104,6 +104,15 @@ bool PPCCTRLoops::runOnMachineFunction(MachineFunction &MF) {
Changed |= processLoop(ML);
}
+#ifndef NDEBUG
+ for (const MachineBasicBlock &BB : MF) {
+ for (const MachineInstr &I : BB)
+ assert((I.getOpcode() != PPC::DecreaseCTRloop &&
+ I.getOpcode() != PPC::DecreaseCTR8loop) &&
+ "CTR loop pseudo is not expanded!");
+ }
+#endif
+
return Changed;
}
More information about the llvm-commits
mailing list