Fixed formatting, removed bug reference, renamed testcase

Thanks to Duncan Exon Smith for reviewing and cleanup suggestions. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213205 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Sanjay Patel
2014-07-16 22:40:28 +00:00
parent 22441c3a0d
commit 07b294a25b
2 changed files with 7 additions and 4 deletions
+4 -3
View File
@@ -2036,7 +2036,8 @@ bool AddressingModeMatcher::MatchOperationAddr(User *AddrInst, unsigned Opcode,
case Instruction::Shl: {
// Can only handle X*C and X << C.
ConstantInt *RHS = dyn_cast<ConstantInt>(AddrInst->getOperand(1));
if (!RHS) return false;
if (!RHS)
return false;
int64_t Scale = RHS->getSExtValue();
if (Opcode == Instruction::Shl)
Scale = 1LL << Scale;
@@ -2130,9 +2131,9 @@ bool AddressingModeMatcher::MatchOperationAddr(User *AddrInst, unsigned Opcode,
return true;
}
case Instruction::SExt: {
// Make sure this isn't a ConstantExpr (PR20314).
Instruction *SExt = dyn_cast<Instruction>(AddrInst);
if (!SExt) return false;
if (!SExt)
return false;
// Try to move this sext out of the way of the addressing mode.
// Ask for a method for doing so.