mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
in findGCD of multiply expr return the gcd
we used to return 1 instead of the gcd git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205800 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -6962,10 +6962,12 @@ public:
|
||||
if (PartialGCD != One)
|
||||
return PartialGCD;
|
||||
|
||||
// Failed to find a PartialGCD: set the Remainder to the full expression,
|
||||
// and return the GCD.
|
||||
Remainder = Expr;
|
||||
const SCEVMulExpr *Mul = dyn_cast<SCEVMulExpr>(GCD);
|
||||
if (!Mul)
|
||||
return PartialGCD;
|
||||
return GCD;
|
||||
|
||||
// When the GCD is a multiply expression, try to decompose it:
|
||||
// this occurs when Step does not divide the Start expression
|
||||
@@ -6979,7 +6981,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
return PartialGCD;
|
||||
return GCD;
|
||||
}
|
||||
|
||||
const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) {
|
||||
|
||||
Reference in New Issue
Block a user