mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-21 03:53:04 +02:00
Fix a major miscompilation where we were overwriting the scale reg.
llvm-svn: 19511
This commit is contained in:
parent
5816f1a302
commit
61c572eb7f
@ -469,7 +469,7 @@ bool ISel::SelectAddress(SDOperand N, X86AddressMode &AM) {
|
||||
AM.Disp += cast<ConstantSDNode>(N)->getValue();
|
||||
return false;
|
||||
case ISD::SHL:
|
||||
if (AM.IndexReg == 0 || AM.Scale == 1)
|
||||
if (AM.IndexReg == 0 && AM.Scale == 1)
|
||||
if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(N.Val->getOperand(1))) {
|
||||
unsigned Val = CN->getValue();
|
||||
if (Val == 1 || Val == 2 || Val == 3) {
|
||||
|
Loading…
Reference in New Issue
Block a user