]> granicus.if.org Git - llvm/commit
[LSR] Pointers with different address spaces are considered incompatible.
authorMikael Holmen <mikael.holmen@ericsson.com>
Tue, 14 Feb 2017 06:37:42 +0000 (06:37 +0000)
committerMikael Holmen <mikael.holmen@ericsson.com>
Tue, 14 Feb 2017 06:37:42 +0000 (06:37 +0000)
commit828d0d9643c381063c55a2605fac889b45880f7b
treed9be4735134132d785cdfa2fb358a374ddbf41a2
parent7fb14d3d3df9837342761672c841d7b3c97e9dcd
[LSR] Pointers with different address spaces are considered incompatible.

Summary:
Function isCompatibleIVType is already used as a guard before the call to

 SE.getMinusSCEV(OperExpr, PrevExpr);

in LSRInstance::ChainInstruction. getMinusSCEV requires the expressions
to be of the same type, so we now consider two pointers with different
address spaces to be incompatible, since it is possible that the pointers
in fact have different sizes.

Reviewers: qcolombet, eli.friedman

Reviewed By: qcolombet

Subscribers: nhaehnle, Ka-Ka, llvm-commits, mzolotukhin

Differential Revision: https://reviews.llvm.org/D29885

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295033 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopStrengthReduce.cpp
test/Transforms/LoopStrengthReduce/AMDGPU/different-addrspace-crash.ll [new file with mode: 0644]