1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=instsimplify -S < %s | FileCheck %s
4 @a1 = internal alias i32, getelementptr ({[3 x i32]}, ptr @b, i32 0, i32 0, i32 1)
5 @a2 = weak alias i32, getelementptr ({[3 x i32]}, ptr @b, i32 0, i32 0, i32 1)
6 @b = internal constant {[3 x i32]} {[3 x i32] [i32 2, i32 3, i32 4]}
8 @c = internal alias i32, getelementptr ({[3 x i32]}, ptr @d, i32 0, i32 0, i32 1)
9 @d = weak constant {[3 x i32]} {[3 x i32] [i32 2, i32 3, i32 4]}
13 ; CHECK-NEXT: ret i32 4
15 %a = load i32, ptr getelementptr (i32, ptr @a1, i64 1)
21 ; CHECK-NEXT: [[A:%.*]] = load i32, ptr getelementptr (i32, ptr @a2, i64 1), align 4
22 ; CHECK-NEXT: ret i32 [[A]]
24 %a = load i32, ptr getelementptr (i32, ptr @a2, i64 1)
30 ; CHECK-NEXT: [[A:%.*]] = load i32, ptr getelementptr (i32, ptr @c, i64 1), align 4
31 ; CHECK-NEXT: ret i32 [[A]]
33 %a = load i32, ptr getelementptr (i32, ptr @c, i64 1)