We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68cf62a commit 42e23e9Copy full SHA for 42e23e9
llvm/lib/CodeGen/PeepholeOptimizer.cpp
@@ -272,7 +272,8 @@ bool PeepholeOptimizer::runOnMachineFunction(MachineFunction &MF) {
272
MII = I->begin(), ME = I->end(); MII != ME; ) {
273
MachineInstr *MI = &*MII;
274
275
- if (MI->getDesc().isCompare()) {
+ if (MI->getDesc().isCompare() &&
276
+ !MI->getDesc().hasUnmodeledSideEffects()) {
277
++MII; // The iterator may become invalid if the compare is deleted.
278
Changed |= OptimizeCmpInstr(MI, MBB);
279
} else {
0 commit comments