[SCEV] Use APInt::operator*=(uint64_t) to avoid a temporary APInt for a constant.

llvm-svn: 302404
This commit is contained in:
Craig Topper 2017-05-08 04:55:13 +00:00
parent f15bec5541
commit 389d8cebd1
1 changed files with 1 additions and 2 deletions

View File

@ -7376,7 +7376,6 @@ SolveQuadraticEquation(const SCEVAddRecExpr *AddRec, ScalarEvolution &SE) {
const APInt &M = MC->getAPInt();
const APInt &N = NC->getAPInt();
APInt Two(BitWidth, 2);
APInt Four(BitWidth, 4);
{
using namespace APIntOps;
@ -7392,7 +7391,7 @@ SolveQuadraticEquation(const SCEVAddRecExpr *AddRec, ScalarEvolution &SE) {
// Compute the B^2-4ac term.
APInt SqrtTerm(B);
SqrtTerm *= B;
SqrtTerm -= Four * (A * C);
SqrtTerm -= 4 * (A * C);
if (SqrtTerm.isNegative()) {
// The loop is provably infinite.