1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature
2 ; RUN: llvm-as --force-opaque-pointers < %s | llvm-dis --force-opaque-pointers | FileCheck %s
3 ; RUN: llvm-as < %s | llvm-dis --force-opaque-pointers | FileCheck %s
4 ; RUN: opt --force-opaque-pointers < %s -S | FileCheck %s
6 ; CHECK: @g = external global i16
7 @g = external global i16
9 ; CHECK: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 1, ptr null, ptr null }]
10 @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 1, void ()* null, i8* null }]
12 ; CHECK: @ga = alias i18, ptr @g2
14 @ga = alias i18, i18* @g2
16 ; CHECK: @ga2 = alias i19, ptr @g2
17 @ga2 = alias i19, i19* bitcast (i18* @g2 to i19*)
19 define void @f(i32* %p) {
20 ; CHECK-LABEL: define {{[^@]+}}@f
21 ; CHECK-SAME: (ptr [[P:%.*]]) {
22 ; CHECK-NEXT: [[A:%.*]] = alloca i17, align 4
23 ; CHECK-NEXT: call void @fn.fwd(i32 0)
24 ; CHECK-NEXT: store i32 0, ptr @g.fwd, align 4
25 ; CHECK-NEXT: ret void
28 call void @fn.fwd(i32 0)
29 store i32 0, i32* @g.fwd
34 declare void @fn.fwd(i32)
36 define void @f2(i32** %p) {
37 ; CHECK-LABEL: define {{[^@]+}}@f2
38 ; CHECK-SAME: (ptr [[P:%.*]]) {
39 ; CHECK-NEXT: unreachable
44 define void @f3(i32 addrspace(1)* addrspace(2)* %p) {
45 ; CHECK-LABEL: define {{[^@]+}}@f3
46 ; CHECK-SAME: (ptr addrspace(2) [[P:%.*]]) {
47 ; CHECK-NEXT: unreachable
52 define void @remangle_intrinsic() {
53 ; CHECK-LABEL: define {{[^@]+}}@remangle_intrinsic() {
54 ; CHECK-NEXT: [[A:%.*]] = alloca ptr, align 8
55 ; CHECK-NEXT: [[TMP1:%.*]] = call ptr @llvm.stacksave()
56 ; CHECK-NEXT: call void @llvm.stackprotector(ptr null, ptr [[A]])
57 ; CHECK-NEXT: [[TMP2:%.*]] = call <2 x i64> @llvm.masked.expandload.v2i64(ptr null, <2 x i1> zeroinitializer, <2 x i64> zeroinitializer)
58 ; CHECK-NEXT: ret void
61 call i8* @llvm.stacksave()
62 call void @llvm.stackprotector(i8* null, i8** %a)
63 call <2 x i64> @llvm.masked.expandload.v2i64(i64* null, <2 x i1> zeroinitializer, <2 x i64> zeroinitializer)
67 define i32* @constexpr_gep() {
68 ; CHECK-LABEL: define {{[^@]+}}@constexpr_gep() {
69 ; CHECK-NEXT: ret ptr getelementptr (i32, ptr getelementptr (i8, ptr null, i64 4), i64 1)
71 ret i32* getelementptr(i32, i32* bitcast (i8* getelementptr (i8, i8* null, i64 4) to i32*), i64 1)
74 declare i8* @llvm.stacksave()
75 declare void @llvm.stackprotector(i8*, i8**)
76 declare <2 x i64> @llvm.masked.expandload.v2i64(i64*, <2 x i1>, <2 x i64>)