Rectify r213231. Use proper version of 'ComputeNumSignBits'.

Earlier when the code was in InstCombine, we were calling the version of ComputeNumSignBits in InstCombine.h
that automatically added the DataLayout* before calling into ValueTracking.
When the code moved to InstSimplify, we are calling into ValueTracking directly without passing in the DataLayout*.
This patch rectifies the same by passing DataLayout in ComputeNumSignBits.

llvm-svn: 213295
This commit is contained in:
Suyog Sarda 2014-07-17 19:07:00 +00:00
parent 3ac7cf3be9
commit 1a212203bc
1 changed files with 1 additions and 1 deletions

View File

@ -1347,7 +1347,7 @@ static Value *SimplifyAShrInst(Value *Op0, Value *Op1, bool isExact,
return X;
// Arithmetic shifting an all-sign-bit value is a no-op.
unsigned NumSignBits = ComputeNumSignBits(Op0);
unsigned NumSignBits = ComputeNumSignBits(Op0, Q.DL);
if (NumSignBits == Op0->getType()->getScalarSizeInBits())
return Op0;