mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-30 04:35:00 +00:00
Make the trunc code consistent with the zext and sext code in its
handling of pointer types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106757 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
27da66db3e
commit
1faa88280e
@ -822,7 +822,8 @@ const SCEV *ScalarEvolution::getTruncateExpr(const SCEV *Op,
|
||||
// Fold if the operand is constant.
|
||||
if (const SCEVConstant *SC = dyn_cast<SCEVConstant>(Op))
|
||||
return getConstant(
|
||||
cast<ConstantInt>(ConstantExpr::getTrunc(SC->getValue(), Ty)));
|
||||
cast<ConstantInt>(ConstantExpr::getTrunc(SC->getValue(),
|
||||
getEffectiveSCEVType(Ty))));
|
||||
|
||||
// trunc(trunc(x)) --> trunc(x)
|
||||
if (const SCEVTruncateExpr *ST = dyn_cast<SCEVTruncateExpr>(Op))
|
||||
|
Loading…
x
Reference in New Issue
Block a user