diff options
| author | Johannes Doerfert <jdoerfert@anl.gov> | 2019-07-11 01:14:48 +0000 |
|---|---|---|
| committer | Johannes Doerfert <jdoerfert@anl.gov> | 2019-07-11 01:14:48 +0000 |
| commit | 3ed286a388836d0cdd2c8a19fb4c295a19935b47 (patch) | |
| tree | f37b2e311f7a7847475e5e222331353a8d0ee2bf /llvm/test/Transforms/InstCombine/gep-addrspace.ll | |
| parent | 24830ea7108197c7880939aa2e32db3aa4bc6284 (diff) | |
| download | bcm5719-llvm-3ed286a388836d0cdd2c8a19fb4c295a19935b47.tar.gz bcm5719-llvm-3ed286a388836d0cdd2c8a19fb4c295a19935b47.zip | |
Replace three "strip & accumulate" implementations with a single one
This patch replaces the three almost identical "strip & accumulate"
implementations for constant pointer offsets with a single one,
combining the respective functionalities. The old interfaces are kept
for now.
Differential Revision: https://reviews.llvm.org/D64468
llvm-svn: 365723
Diffstat (limited to 'llvm/test/Transforms/InstCombine/gep-addrspace.ll')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/gep-addrspace.ll | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/test/Transforms/InstCombine/gep-addrspace.ll b/llvm/test/Transforms/InstCombine/gep-addrspace.ll index fadf2ae6bf6..8eda61ccfb9 100644 --- a/llvm/test/Transforms/InstCombine/gep-addrspace.ll +++ b/llvm/test/Transforms/InstCombine/gep-addrspace.ll @@ -42,15 +42,14 @@ define void @keep_necessary_addrspacecast(i64 %i, float** %out0, float** %out1) declare void @escape_alloca(i16*) -; check that addrspacecast is not ignored (leading to an assertion failure) -; when trying to mark a GEP as inbounds +; check that addrspacecast is stripped when trying to mark a GEP as inbounds define { i8, i8 } @inbounds_after_addrspacecast() { ; CHECK-LABEL: @inbounds_after_addrspacecast( ; CHECK-NEXT: [[T0:%.*]] = alloca i16, align 2 ; CHECK-NEXT: call void @escape_alloca(i16* nonnull [[T0]]) ; CHECK-NEXT: [[TMPCAST:%.*]] = bitcast i16* [[T0]] to [2 x i8]* ; CHECK-NEXT: [[T1:%.*]] = addrspacecast [2 x i8]* [[TMPCAST]] to [2 x i8] addrspace(11)* -; CHECK-NEXT: [[T2:%.*]] = getelementptr [2 x i8], [2 x i8] addrspace(11)* [[T1]], i64 0, i64 1 +; CHECK-NEXT: [[T2:%.*]] = getelementptr inbounds [2 x i8], [2 x i8] addrspace(11)* [[T1]], i64 0, i64 1 ; CHECK-NEXT: [[T3:%.*]] = load i8, i8 addrspace(11)* [[T2]], align 1 ; CHECK-NEXT: [[INSERT:%.*]] = insertvalue { i8, i8 } zeroinitializer, i8 [[T3]], 1 ; CHECK-NEXT: ret { i8, i8 } [[INSERT]] |

