diff options
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]] |

