mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-03 19:02:35 +00:00
Fix a minor bug which resulted in intermediate calculations
using wider types than are necessary. llvm-svn: 110241
This commit is contained in:
parent
670b397ecc
commit
bafce59252
@ -1896,7 +1896,7 @@ const SCEV *ScalarEvolution::getUDivExpr(const SCEV *LHS,
|
||||
// TODO: Generalize this to non-constants by using known-bits information.
|
||||
const Type *Ty = LHS->getType();
|
||||
unsigned LZ = RHSC->getValue()->getValue().countLeadingZeros();
|
||||
unsigned MaxShiftAmt = getTypeSizeInBits(Ty) - LZ;
|
||||
unsigned MaxShiftAmt = getTypeSizeInBits(Ty) - LZ - 1;
|
||||
// For non-power-of-two values, effectively round the value up to the
|
||||
// nearest power of two.
|
||||
if (!RHSC->getValue()->getValue().isPowerOf2())
|
||||
|
Loading…
x
Reference in New Issue
Block a user