[WebAssembly] Fix WebAssemblyPeephole to set Changed to true when making changes.
authorDan Gohman <dan433584@gmail.com>
Thu, 10 Dec 2015 14:16:34 +0000 (14:16 +0000)
committerDan Gohman <dan433584@gmail.com>
Thu, 10 Dec 2015 14:16:34 +0000 (14:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255252 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/WebAssemblyPeephole.cpp

index 77514bb..ab539e1 100644 (file)
@@ -70,6 +70,7 @@ bool WebAssemblyPeephole::runOnMachineFunction(MachineFunction &MF) {
         MachineOperand &MO = MI.getOperand(0);
         unsigned OldReg = MO.getReg();
         if (OldReg == MI.getOperand(3).getReg()) {
+          Changed = true;
           unsigned NewReg = MRI.createVirtualRegister(MRI.getRegClass(OldReg));
           MO.setReg(NewReg);
           MO.setIsDead();