diff options
author | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2019-07-31 16:33:11 +0000 |
---|---|---|
committer | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2019-07-31 16:33:11 +0000 |
commit | ba1e845c211893c3c2f392913232b176908ea7a2 (patch) | |
tree | 2b9ada64a7eaa4d3dba5d6f0b31a460084ffab6d /llvm/test/Transforms/LoadStoreVectorizer/AMDGPU | |
parent | a4ea27de9287744c5584e5f4eb755030661e665d (diff) | |
download | bcm5719-llvm-ba1e845c211893c3c2f392913232b176908ea7a2.tar.gz bcm5719-llvm-ba1e845c211893c3c2f392913232b176908ea7a2.zip |
[AMDGPU] Fix for vectorizer crash with pointers of different size
When vectorizer strips pointers it can eventually end up with
pointers of two different sizes, then SCEV will crash.
Differential Revision: https://reviews.llvm.org/D65480
llvm-svn: 367443
Diffstat (limited to 'llvm/test/Transforms/LoadStoreVectorizer/AMDGPU')
-rw-r--r-- | llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/vect-ptr-ptr-size-mismatch.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/vect-ptr-ptr-size-mismatch.ll b/llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/vect-ptr-ptr-size-mismatch.ll new file mode 100644 index 00000000000..197a439102f --- /dev/null +++ b/llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/vect-ptr-ptr-size-mismatch.ll @@ -0,0 +1,18 @@ +; RUN: opt -mtriple=amdgcn-amd-amdhsa -load-store-vectorizer -S < %s | FileCheck %s + +target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32" + +; CHECK-LABEL: @test +; CHECK: store i32* undef, i32** %tmp9, align 8 +; CHECK: store i32* undef, i32** %tmp7, align 8 +define amdgpu_kernel void @test() { +entry: + %a10.ascast.i = addrspacecast i32* addrspace(5)* null to i32** + %tmp4 = icmp eq i32 undef, 0 + %tmp6 = select i1 false, i32** undef, i32** undef + %tmp7 = select i1 %tmp4, i32** null, i32** %tmp6 + %tmp9 = select i1 %tmp4, i32** %a10.ascast.i, i32** null + store i32* undef, i32** %tmp9, align 8 + store i32* undef, i32** %tmp7, align 8 + unreachable +} |