1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature
2 ; RUN: llvm-as --opaque-pointers < %s | llvm-dis --opaque-pointers | FileCheck %s
3 ; RUN: llvm-as < %s | llvm-dis --opaque-pointers | FileCheck %s
4 ; RUN: opt --opaque-pointers < %s -S | FileCheck %s
5 ; RUN: verify-uselistorder --opaque-pointers < %s
9 ; CHECK: @g = external global i16
10 @g = external global i16
12 ; CHECK: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 1, ptr null, ptr null }]
13 @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 1, void ()* null, i8* null }]
15 ; CHECK: @ga = alias i18, ptr @g2
17 @ga = alias i18, i18* @g2
19 ; CHECK: @ga2 = alias i19, ptr @g2
20 @ga2 = alias i19, i19* bitcast (i18* @g2 to i19*)
22 define void @f(i32* %p) {
23 ; CHECK-LABEL: define {{[^@]+}}@f
24 ; CHECK-SAME: (ptr [[P:%.*]]) {
25 ; CHECK-NEXT: [[A:%.*]] = alloca i17, align 4
26 ; CHECK-NEXT: call void @fn.fwd(i32 0)
27 ; CHECK-NEXT: store i32 0, ptr @g.fwd, align 4
28 ; CHECK-NEXT: ret void
31 call void @fn.fwd(i32 0)
32 store i32 0, i32* @g.fwd
37 declare void @fn.fwd(i32)
39 define void @f2(i32** %p) {
40 ; CHECK-LABEL: define {{[^@]+}}@f2
41 ; CHECK-SAME: (ptr [[P:%.*]]) {
42 ; CHECK-NEXT: unreachable
47 define void @f3(i32 addrspace(1)* addrspace(2)* %p) {
48 ; CHECK-LABEL: define {{[^@]+}}@f3
49 ; CHECK-SAME: (ptr addrspace(2) [[P:%.*]]) {
50 ; CHECK-NEXT: unreachable
55 define void @f4(%ty* %p) {
56 ; CHECK-LABEL: define {{[^@]+}}@f4
57 ; CHECK-SAME: (ptr [[P:%.*]]) {
58 ; CHECK-NEXT: unreachable
63 define void @remangle_intrinsic() {
64 ; CHECK-LABEL: define {{[^@]+}}@remangle_intrinsic() {
65 ; CHECK-NEXT: [[A:%.*]] = alloca ptr, align 8
66 ; CHECK-NEXT: [[TMP1:%.*]] = call ptr @llvm.stacksave()
67 ; CHECK-NEXT: call void @llvm.stackprotector(ptr null, ptr [[A]])
68 ; CHECK-NEXT: [[TMP2:%.*]] = call <2 x i64> @llvm.masked.expandload.v2i64(ptr null, <2 x i1> zeroinitializer, <2 x i64> zeroinitializer)
69 ; CHECK-NEXT: ret void
72 call i8* @llvm.stacksave()
73 call void @llvm.stackprotector(i8* null, i8** %a)
74 call <2 x i64> @llvm.masked.expandload.v2i64(i64* null, <2 x i1> zeroinitializer, <2 x i64> zeroinitializer)
78 define i32* @constexpr_gep() {
79 ; CHECK-LABEL: define {{[^@]+}}@constexpr_gep() {
80 ; CHECK-NEXT: ret ptr getelementptr (i32, ptr getelementptr (i8, ptr null, i64 4), i64 1)
82 ret i32* getelementptr(i32, i32* bitcast (i8* getelementptr (i8, i8* null, i64 4) to i32*), i64 1)
85 declare i8* @llvm.stacksave()
86 declare void @llvm.stackprotector(i8*, i8**)
87 declare <2 x i64> @llvm.masked.expandload.v2i64(i64*, <2 x i1>, <2 x i64>)