diff options
| author | Philip Reames <listmail@philipreames.com> | 2019-01-24 16:08:18 +0000 |
|---|---|---|
| committer | Philip Reames <listmail@philipreames.com> | 2019-01-24 16:08:18 +0000 |
| commit | a657510eb7492896589c97065e2ef3c770742a78 (patch) | |
| tree | 57f199cee86f978cab12624c7de018ccbe364264 /llvm/test/Transforms/RewriteStatepointsForGC/base-vector.ll | |
| parent | f7098b3a041eaa8e6af607cc298036924ec512ee (diff) | |
| download | bcm5719-llvm-a657510eb7492896589c97065e2ef3c770742a78.tar.gz bcm5719-llvm-a657510eb7492896589c97065e2ef3c770742a78.zip | |
[RS4GC] Avoid crashing on gep scalar_base, vector_idx
This is an alternative to https://reviews.llvm.org/D57103. After discussion, we dedicided to check this in as a temporary workaround, and pursue a true fix under the original thread.
The issue at hand is that the base rewriting algorithm doesn't consider the fact that GEPs can turn a scalar input into a vector of outputs. We had handling for scalar GEPs and fully vector GEPs (i.e. all vector operands), but not the scalar-base + vector-index forms. A true fix here requires treating GEP analogously to extractelement or shufflevector.
This patch is merely a workaround. It simply hides the crash at the cost of some ugly code gen for this presumable very rare pattern.
Differential Revision: https://reviews.llvm.org/D57138
llvm-svn: 352059
Diffstat (limited to 'llvm/test/Transforms/RewriteStatepointsForGC/base-vector.ll')
| -rw-r--r-- | llvm/test/Transforms/RewriteStatepointsForGC/base-vector.ll | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/Transforms/RewriteStatepointsForGC/base-vector.ll b/llvm/test/Transforms/RewriteStatepointsForGC/base-vector.ll index 3b6f32acf3c..f37684a10c8 100644 --- a/llvm/test/Transforms/RewriteStatepointsForGC/base-vector.ll +++ b/llvm/test/Transforms/RewriteStatepointsForGC/base-vector.ll @@ -253,7 +253,7 @@ define void @test11(<4 x i64 addrspace(1)*> %vec1) gc "statepoint-example" { ; CHECK: @llvm.experimental.gc.statepoint.p0f_isVoidf{{.*}}<4 x i64 addrspace(1)*> %vec1) ; CHECK: %vec1.relocated = call coldcc <4 x i8 addrspace(1)*> @llvm.experimental.gc.relocate.v4p1i8 ; CHECK: %vec1.relocated.casted = bitcast <4 x i8 addrspace(1)*> %vec1.relocated to <4 x i64 addrspace(1)*> -; CHECK: %vec2.remat = getelementptr i64, <4 x i64 addrspace(1)*> %vec1.relocated.casted, i32 1024 +; CHECK: %vec2.remat = getelementptr i64, <4 x i64 addrspace(1)*> %vec1.relocated.casted, <4 x i32> <i32 1024, i32 1024, i32 1024, i32 1024> ; CHECK: call void @use_vec(<4 x i64 addrspace(1)*> %vec2.remat) entry: %vec2 = getelementptr i64, <4 x i64 addrspace(1)*> %vec1, i32 1024 |

