llvm-project/llvm/test/Transforms/AlignmentFromAssumptions
Richard Diamond 4bf015c035 [AlignmentFromAssumptions] Fix a SCEV assertion resulting from address space differences.
Summary:
On targets with different pointer sizes, -alignment-from-assumptions could attempt to create SCEV expressions which use different effective SCEV types. The provided test illustrates the issue.

In `getNewAlignment`, AASCEV would be the (only) alloca, which would have an effective SCEV type of i32. But PtrSCEV, the GEP in this case, due to being in the flat/default address space, will have an effective SCEV of i64.

This patch resolves the issue by truncating PtrSCEV to AASCEV's effective type.

Reviewers: hfinkel, jdoerfert

Reviewed By: jdoerfert

Subscribers: jvesely, nhaehnle, hiraditya, javed.absar, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75471
2020-03-29 01:26:31 -05:00
..
amdgpu-crash.ll [AlignmentFromAssumptions] Fix a SCEV assertion resulting from address space differences. 2020-03-29 01:26:31 -05:00
simple.ll [AlignmentFromAssumptions] getNewAlignmentDiff(): use getURemExpr() 2019-08-23 02:17:04 +00:00
simple32.ll
start-unk.ll