aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86FastISel.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp
index 59500ad..3d57590 100644
--- a/lib/Target/X86/X86FastISel.cpp
+++ b/lib/Target/X86/X86FastISel.cpp
@@ -741,7 +741,11 @@ bool X86FastISel::X86SelectShift(Instruction *I) {
if (Op1Reg == 0) return false;
TII.copyRegToReg(*MBB, MBB->end(), CReg, Op1Reg, RC, RC);
unsigned ResultReg = createResultReg(RC);
- BuildMI(MBB, TII.get(OpReg), ResultReg).addReg(Op0Reg);
+ BuildMI(MBB, TII.get(OpReg), ResultReg).addReg(Op0Reg)
+ // FIXME: The "Local" register allocator's physreg liveness doesn't
+ // recognize subregs. Adding the superreg of CL that's actually defined
+ // prevents it from being re-allocated for this instruction.
+ .addReg(CReg, false, true);
UpdateValueMap(I, ResultReg);
return true;
}