diff options
author | Suyog Sarda <suyog.sarda@samsung.com> | 2014-07-17 19:07:00 +0000 |
---|---|---|
committer | Suyog Sarda <suyog.sarda@samsung.com> | 2014-07-17 19:07:00 +0000 |
commit | 1a212203bce418f5df59239087811cdacfdb7542 (patch) | |
tree | db488e330e1945fb01d2d01ff0d196fda138486d /llvm/lib/Analysis/InstructionSimplify.cpp | |
parent | 3ac7cf3be93afe676c0a2069ab6a506f7833ba00 (diff) | |
download | bcm5719-llvm-1a212203bce418f5df59239087811cdacfdb7542.tar.gz bcm5719-llvm-1a212203bce418f5df59239087811cdacfdb7542.zip |
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
Diffstat (limited to 'llvm/lib/Analysis/InstructionSimplify.cpp')
-rw-r--r-- | llvm/lib/Analysis/InstructionSimplify.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp index 6ac1ae8d5ed..7a820a58f6f 100644 --- a/llvm/lib/Analysis/InstructionSimplify.cpp +++ b/llvm/lib/Analysis/InstructionSimplify.cpp @@ -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; |