mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
$ svn merge -c 113848 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r113848 into '.': U lib/CodeGen/PeepholeOptimizer.cpp must not peephole away side effects git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_28@113913 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -272,7 +272,8 @@ bool PeepholeOptimizer::runOnMachineFunction(MachineFunction &MF) {
|
||||
MII = I->begin(), ME = I->end(); MII != ME; ) {
|
||||
MachineInstr *MI = &*MII;
|
||||
|
||||
if (MI->getDesc().isCompare()) {
|
||||
if (MI->getDesc().isCompare() &&
|
||||
!MI->getDesc().hasUnmodeledSideEffects()) {
|
||||
++MII; // The iterator may become invalid if the compare is deleted.
|
||||
Changed |= OptimizeCmpInstr(MI, MBB);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user