1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -gvn < %s | FileCheck %s
4 define i64 @test(i64** noalias %p, i64* noalias %q) {
7 ; CHECK-NEXT: store i64* [[Q:%.*]], i64** [[P:%.*]], align 8
8 ; CHECK-NEXT: br i1 false, label [[IF:%.*]], label [[MERGE:%.*]]
10 ; CHECK-NEXT: call void @clobber(i64** [[P]])
11 ; CHECK-NEXT: br label [[MERGE]]
13 ; CHECK-NEXT: store i64 1, i64* [[Q]], align 4
14 ; CHECK-NEXT: [[Q3:%.*]] = getelementptr i64, i64* [[Q]], i64 1
15 ; CHECK-NEXT: store i64 2, i64* [[Q3]], align 4
16 ; CHECK-NEXT: ret i64 1
19 store i64* %q, i64** %p
20 br i1 false, label %if, label %merge
23 call void @clobber(i64** %p)
27 %q2 = load i64*, i64** %p
29 %v = load i64, i64* %q
30 %q3 = getelementptr i64, i64* %q, i64 %v
32 %v2 = load i64, i64* %q
36 declare void @clobber(i64** %p)