summaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-11-16 16:25:41 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-11-16 16:25:41 +0000
commitb69143c6a9bfc969e7c95bbd48b83bb962086070 (patch)
tree6aa7a4e07fbcd33f7b6465e1e7e35d212cb493c1 /lib/Analysis
parent411079785388290738049dd099bff8755e6a2c8d (diff)
downloadllvm-b69143c6a9bfc969e7c95bbd48b83bb962086070.tar.gz
llvm-b69143c6a9bfc969e7c95bbd48b83bb962086070.tar.bz2
llvm-b69143c6a9bfc969e7c95bbd48b83bb962086070.tar.xz
Annotate APInt methods where it's not clear whether they are in place with warn_unused_result.
Fix ScalarEvolution bugs uncovered by this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194928 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/ScalarEvolution.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index 0f54d7ebda..0a02f4e9d7 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -6684,9 +6684,9 @@ static const APInt gcd(const SCEVConstant *C1, const SCEVConstant *C2) {
uint32_t BBW = B.getBitWidth();
if (ABW > BBW)
- B.zext(ABW);
+ B = B.zext(ABW);
else if (ABW < BBW)
- A.zext(BBW);
+ A = A.zext(BBW);
return APIntOps::GreatestCommonDivisor(A, B);
}
@@ -6698,9 +6698,9 @@ static const APInt srem(const SCEVConstant *C1, const SCEVConstant *C2) {
uint32_t BBW = B.getBitWidth();
if (ABW > BBW)
- B.sext(ABW);
+ B = B.sext(ABW);
else if (ABW < BBW)
- A.sext(BBW);
+ A = A.sext(BBW);
return APIntOps::srem(A, B);
}
@@ -6712,9 +6712,9 @@ static const APInt sdiv(const SCEVConstant *C1, const SCEVConstant *C2) {
uint32_t BBW = B.getBitWidth();
if (ABW > BBW)
- B.sext(ABW);
+ B = B.sext(ABW);
else if (ABW < BBW)
- A.sext(BBW);
+ A = A.sext(BBW);
return APIntOps::sdiv(A, B);
}