Index: lib/Target/X86/X86FixupBWInsts.cpp =================================================================== --- lib/Target/X86/X86FixupBWInsts.cpp +++ lib/Target/X86/X86FixupBWInsts.cpp @@ -265,6 +265,11 @@ return false; if (SubRegIdx == X86::sub_8bit) { + // We've checked that the 32-bit super register isn't live, but the + // 16-bit form might still be live. + unsigned DestReg16 = getX86SubSuperRegister(OrigDestReg, 16); + if (isLive(*OrigMI, LiveRegs, TRI, DestReg16)) + return false; // In the case of byte registers, we also have to check that the upper // byte register is also dead. That is considered to be independent of // whether the super-register is dead.