[llvm] r302404 - [SCEV] Use APInt::operator*=(uint64_t) to avoid a temporary APInt for a constant.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun May 7 21:55:14 PDT 2017
Author: ctopper
Date: Sun May 7 23:55:13 2017
New Revision: 302404
URL: http://llvm.org/viewvc/llvm-project?rev=302404&view=rev
Log:
[SCEV] Use APInt::operator*=(uint64_t) to avoid a temporary APInt for a constant.
Modified:
llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=302404&r1=302403&r2=302404&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Sun May 7 23:55:13 2017
@@ -7376,7 +7376,6 @@ SolveQuadraticEquation(const SCEVAddRecE
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 SCEVAddRecE
// 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.
More information about the llvm-commits
mailing list