mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-04 06:09:05 +00:00
Make RequiresTypeConversion canonicalize the types before calling the
target hooks canLosslesslyBitCastTo and isTruncateFree. This allows targets to avoid worrying about handling all combinations of integer and pointer types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70555 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9032b78c98
commit
9f2d671b15
@ -1170,7 +1170,9 @@ bool LoopStrengthReduce::RequiresTypeConversion(const Type *Ty1,
|
|||||||
const Type *Ty2) {
|
const Type *Ty2) {
|
||||||
if (Ty1 == Ty2)
|
if (Ty1 == Ty2)
|
||||||
return false;
|
return false;
|
||||||
if (SE->getEffectiveSCEVType(Ty1) == SE->getEffectiveSCEVType(Ty2))
|
Ty1 = SE->getEffectiveSCEVType(Ty1);
|
||||||
|
Ty2 = SE->getEffectiveSCEVType(Ty2);
|
||||||
|
if (Ty1 == Ty2)
|
||||||
return false;
|
return false;
|
||||||
if (Ty1->canLosslesslyBitCastTo(Ty2))
|
if (Ty1->canLosslesslyBitCastTo(Ty2))
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user