Skip to content

Commit 1456959

Browse files
committed
Stop adding bogus operands to variable shifts on X86. These instructions
only take one operand. The other comes implicitly in through CL. llvm-svn: 22887
1 parent be1f314 commit 1456959

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/X86/X86ISelPattern.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3223,7 +3223,7 @@ unsigned ISel::SelectExpr(SDOperand N) {
32233223
case MVT::i32: Opc = X86::SHL32rCL; break;
32243224
}
32253225
BuildMI(BB, X86::MOV8rr, 1, X86::CL).addReg(Tmp2);
3226-
BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addReg(Tmp2);
3226+
BuildMI(BB, Opc, 1, Result).addReg(Tmp1);
32273227
return Result;
32283228
case ISD::SRL:
32293229
if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(N.getOperand(1))) {
@@ -3253,7 +3253,7 @@ unsigned ISel::SelectExpr(SDOperand N) {
32533253
case MVT::i32: Opc = X86::SHR32rCL; break;
32543254
}
32553255
BuildMI(BB, X86::MOV8rr, 1, X86::CL).addReg(Tmp2);
3256-
BuildMI(BB, Opc, 2, Result).addReg(Tmp1).addReg(Tmp2);
3256+
BuildMI(BB, Opc, 1, Result).addReg(Tmp1);
32573257
return Result;
32583258
case ISD::SRA:
32593259
if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(N.getOperand(1))) {

0 commit comments

Comments
 (0)