[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)
llvm-svn: 255252

llvm/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();