diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-11-16 16:25:41 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-11-16 16:25:41 +0000 |
commit | b69143c6a9bfc969e7c95bbd48b83bb962086070 (patch) | |
tree | 6aa7a4e07fbcd33f7b6465e1e7e35d212cb493c1 /lib | |
parent | 411079785388290738049dd099bff8755e6a2c8d (diff) | |
download | external_llvm-b69143c6a9bfc969e7c95bbd48b83bb962086070.zip external_llvm-b69143c6a9bfc969e7c95bbd48b83bb962086070.tar.gz external_llvm-b69143c6a9bfc969e7c95bbd48b83bb962086070.tar.bz2 |
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')
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 0f54d7e..0a02f4e 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); } |