Fix bug in commit 323096 exposed by test in test-suite-verify-machineinstrs-x86_64h-O3
authorMarina Yatsina <marina.yatsina@intel.com>
Mon, 22 Jan 2018 15:31:05 +0000 (15:31 +0000)
committerMarina Yatsina <marina.yatsina@intel.com>
Mon, 22 Jan 2018 15:31:05 +0000 (15:31 +0000)
Change-Id: I0a4b10d0d6c8de606d989c567ec07944ae283a87
llvm-svn: 323126

llvm/lib/Target/X86/X86InstrInfo.cpp

index 910e88c..de1a3b4 100644 (file)
@@ -8336,7 +8336,7 @@ void X86InstrInfo::breakPartialRegDependency(
     // Using XOR32rr because it has shorter encoding and zeros up the upper bits
     // as well.
     unsigned XReg = TRI->getSubReg(Reg, X86::sub_32bit);
-    BuildMI(*MI.getParent(), MI, MI.getDebugLoc(), get(X86::XOR32rr), Reg)
+    BuildMI(*MI.getParent(), MI, MI.getDebugLoc(), get(X86::XOR32rr), XReg)
         .addReg(XReg, RegState::Undef)
         .addReg(XReg, RegState::Undef)
         .addReg(Reg, RegState::ImplicitDefine);