[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / CodeGen / pr53127.cpp
blob97fe1291352d3cf642b301e73b0403a411fa99bc
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // RUN: %clang_cc1 -emit-llvm %s -o - -triple x86_64-unknown-linux-gnu | FileCheck %s
4 bool e();
6 void operator delete(void*);
8 // CHECK-LABEL: @_Z1fPiz(
9 // CHECK-NEXT: entry:
10 // CHECK-NEXT: [[P_ADDR:%.*]] = alloca ptr, align 8
11 // CHECK-NEXT: [[L:%.*]] = alloca [1 x %struct.__va_list_tag], align 16
12 // CHECK-NEXT: [[L2:%.*]] = alloca [1 x %struct.__va_list_tag], align 16
13 // CHECK-NEXT: store ptr [[P:%.*]], ptr [[P_ADDR]], align 8
14 // CHECK-NEXT: [[CALL:%.*]] = call noundef zeroext i1 @_Z1ev()
15 // CHECK-NEXT: br i1 [[CALL]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
16 // CHECK: cond.true:
17 // CHECK-NEXT: call void @llvm.trap()
18 // CHECK-NEXT: br label [[COND_END:%.*]]
19 // CHECK: cond.false:
20 // CHECK-NEXT: br label [[COND_END]]
21 // CHECK: cond.end:
22 // CHECK-NEXT: [[CALL1:%.*]] = call noundef zeroext i1 @_Z1ev()
23 // CHECK-NEXT: br i1 [[CALL1]], label [[COND_TRUE2:%.*]], label [[COND_FALSE3:%.*]]
24 // CHECK: cond.true2:
25 // CHECK-NEXT: call void @llvm.debugtrap()
26 // CHECK-NEXT: br label [[COND_END4:%.*]]
27 // CHECK: cond.false3:
28 // CHECK-NEXT: br label [[COND_END4]]
29 // CHECK: cond.end4:
30 // CHECK-NEXT: [[CALL5:%.*]] = call noundef zeroext i1 @_Z1ev()
31 // CHECK-NEXT: [[TMP0:%.*]] = zext i1 [[CALL5]] to i64
32 // CHECK-NEXT: call void @llvm.assume(i1 true)
33 // CHECK-NEXT: [[CALL6:%.*]] = call noundef zeroext i1 @_Z1ev()
34 // CHECK-NEXT: br i1 [[CALL6]], label [[COND_TRUE7:%.*]], label [[COND_FALSE8:%.*]]
35 // CHECK: cond.true7:
36 // CHECK-NEXT: [[ARRAYDECAY:%.*]] = getelementptr inbounds [1 x %struct.__va_list_tag], ptr [[L]], i64 0, i64 0
37 // CHECK-NEXT: call void @llvm.va_start(ptr [[ARRAYDECAY]])
38 // CHECK-NEXT: br label [[COND_END9:%.*]]
39 // CHECK: cond.false8:
40 // CHECK-NEXT: br label [[COND_END9]]
41 // CHECK: cond.end9:
42 // CHECK-NEXT: [[CALL10:%.*]] = call noundef zeroext i1 @_Z1ev()
43 // CHECK-NEXT: br i1 [[CALL10]], label [[COND_TRUE11:%.*]], label [[COND_FALSE14:%.*]]
44 // CHECK: cond.true11:
45 // CHECK-NEXT: [[ARRAYDECAY12:%.*]] = getelementptr inbounds [1 x %struct.__va_list_tag], ptr [[L]], i64 0, i64 0
46 // CHECK-NEXT: [[ARRAYDECAY13:%.*]] = getelementptr inbounds [1 x %struct.__va_list_tag], ptr [[L2]], i64 0, i64 0
47 // CHECK-NEXT: call void @llvm.va_copy(ptr [[ARRAYDECAY12]], ptr [[ARRAYDECAY13]])
48 // CHECK-NEXT: br label [[COND_END15:%.*]]
49 // CHECK: cond.false14:
50 // CHECK-NEXT: br label [[COND_END15]]
51 // CHECK: cond.end15:
52 // CHECK-NEXT: [[CALL16:%.*]] = call noundef zeroext i1 @_Z1ev()
53 // CHECK-NEXT: br i1 [[CALL16]], label [[COND_TRUE17:%.*]], label [[COND_FALSE18:%.*]]
54 // CHECK: cond.true17:
55 // CHECK-NEXT: [[TMP1:%.*]] = load ptr, ptr [[P_ADDR]], align 8
56 // CHECK-NEXT: call void @llvm.prefetch.p0(ptr [[TMP1]], i32 0, i32 3, i32 1)
57 // CHECK-NEXT: br label [[COND_END19:%.*]]
58 // CHECK: cond.false18:
59 // CHECK-NEXT: br label [[COND_END19]]
60 // CHECK: cond.end19:
61 // CHECK-NEXT: [[CALL20:%.*]] = call noundef zeroext i1 @_Z1ev()
62 // CHECK-NEXT: br i1 [[CALL20]], label [[COND_TRUE21:%.*]], label [[COND_FALSE22:%.*]]
63 // CHECK: cond.true21:
64 // CHECK-NEXT: call void @llvm.eh.unwind.init()
65 // CHECK-NEXT: br label [[COND_END23:%.*]]
66 // CHECK: cond.false22:
67 // CHECK-NEXT: br label [[COND_END23]]
68 // CHECK: cond.end23:
69 // CHECK-NEXT: [[CALL24:%.*]] = call noundef zeroext i1 @_Z1ev()
70 // CHECK-NEXT: [[TMP2:%.*]] = zext i1 [[CALL24]] to i64
71 // CHECK-NEXT: [[TMP3:%.*]] = load ptr, ptr [[P_ADDR]], align 8
72 // CHECK-NEXT: call void @_ZdlPv(ptr noundef [[TMP3]]) #[[ATTR8:[0-9]+]]
73 // CHECK-NEXT: ret void
75 void f(int* p, ...)
77 e() ? __builtin_trap() : void();
78 e() ? __builtin_debugtrap() : void();
79 e() ? __builtin_assume(true) : void();
80 __builtin_va_list l;
81 e() ? __builtin_va_start(l, p) : void();
82 __builtin_va_list l2;
83 e() ? __builtin_va_copy(l, l2) : void();
84 e() ? __builtin_prefetch(p) : void();
85 e() ? __builtin_unwind_init() : void();
86 e() ? __builtin_operator_delete(p) : void();