forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 339
/
Copy pathflexible-array-member-promotion-call-builtin-O2.c
202 lines (195 loc) · 14.7 KB
/
flexible-array-member-promotion-call-builtin-O2.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --replace-value-regex "!annotation ![0-9]+" "!tbaa ![0-9]+" "!tbaa\.struct ![0-9]+" "!nosanitize ![0-9]+" "!srcloc ![0-9]+" --prefix-filecheck-ir-name TMP_
// RUN: %clang_cc1 -O2 -triple arm64-apple-iphoneos -fbounds-safety -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -O2 -triple arm64-apple-iphoneos -fbounds-safety -x objective-c -fbounds-attributes-objc-experimental -emit-llvm %s -o - | FileCheck %s
#include <ptrcheck.h>
typedef struct {
int count;
int elems[__counted_by(count)];
} flex_t;
// CHECK-LABEL: @set(
// CHECK-NEXT: entry:
// CHECK-NEXT: [[DOTNOT:%.*]] = icmp eq ptr [[FLEX:%.*]], null, {{!annotation ![0-9]+}}
// CHECK-NEXT: br i1 [[DOTNOT]], label [[BOUNDSCHECK_CONT:%.*]], label [[BOUNDSCHECK_NOTNULL:%.*]], {{!annotation ![0-9]+}}
// CHECK: boundscheck.notnull:
// CHECK-NEXT: [[ELEMS:%.*]] = getelementptr inbounds nuw i8, ptr [[FLEX]], i64 4
// CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[FLEX]], align 4, {{!tbaa ![0-9]+}}
// CHECK-NEXT: [[IDX_EXT:%.*]] = sext i32 [[TMP0]] to i64
// CHECK-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, ptr [[ELEMS]], i64 [[IDX_EXT]]
// CHECK-NEXT: br label [[BOUNDSCHECK_CONT]]
// CHECK: boundscheck.cont:
// CHECK-NEXT: [[AGG_TEMP1_SROA_3_0:%.*]] = phi ptr [ [[ADD_PTR]], [[BOUNDSCHECK_NOTNULL]] ], [ null, [[ENTRY:%.*]] ]
// CHECK-NEXT: [[CONV:%.*]] = zext i32 [[SIZE:%.*]] to i64
// CHECK-NEXT: [[CMP_NOT:%.*]] = icmp ugt ptr [[FLEX]], [[AGG_TEMP1_SROA_3_0]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_LHS_CAST:%.*]] = ptrtoint ptr [[AGG_TEMP1_SROA_3_0]] to i64, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_RHS_CAST:%.*]] = ptrtoint ptr [[FLEX]] to i64, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_SUB:%.*]] = sub i64 [[SUB_PTR_LHS_CAST]], [[SUB_PTR_RHS_CAST]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[CMP67_NOT:%.*]] = icmp ult i64 [[SUB_PTR_SUB]], [[CONV]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[OR_COND:%.*]] = or i1 [[CMP_NOT]], [[CMP67_NOT]], {{!annotation ![0-9]+}}
// CHECK-NEXT: br i1 [[OR_COND]], label [[TRAP:%.*]], label [[CONT:%.*]], {{!annotation ![0-9]+}}
// CHECK: trap:
// CHECK-NEXT: tail call void @llvm.ubsantrap(i8 25) #[[ATTR4:[0-9]+]], {{!annotation ![0-9]+}}
// CHECK-NEXT: unreachable, {{!annotation ![0-9]+}}
// CHECK: cont:
// CHECK-NEXT: tail call void @llvm.memset.p0.i64(ptr align 1 [[FLEX]], i8 0, i64 [[CONV]], i1 false)
// CHECK-NEXT: [[DOTNOT88:%.*]] = icmp ne ptr [[FLEX]], null, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[DOTNOT89:%.*]] = icmp eq i32 [[SIZE]], 0, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[OR_COND90:%.*]] = and i1 [[DOTNOT88]], [[DOTNOT89]], {{!annotation ![0-9]+}}
// CHECK-NEXT: br i1 [[OR_COND90]], label [[TRAP]], label [[CONT87:%.*]], {{!annotation ![0-9]+}}
// CHECK: cont87:
// CHECK-NEXT: ret ptr [[FLEX]]
//
void *set(flex_t *flex, unsigned size) {
return __builtin_memset(flex, 0, size);
}
// CHECK-LABEL: @cpy(
// CHECK-NEXT: entry:
// CHECK-NEXT: [[DOTNOT:%.*]] = icmp eq ptr [[DEST:%.*]], null, {{!annotation ![0-9]+}}
// CHECK-NEXT: br i1 [[DOTNOT]], label [[BOUNDSCHECK_CONT:%.*]], label [[BOUNDSCHECK_NOTNULL:%.*]], {{!annotation ![0-9]+}}
// CHECK: boundscheck.notnull:
// CHECK-NEXT: [[ELEMS:%.*]] = getelementptr inbounds nuw i8, ptr [[DEST]], i64 4
// CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[DEST]], align 4, {{!tbaa ![0-9]+}}
// CHECK-NEXT: [[IDX_EXT:%.*]] = sext i32 [[TMP0]] to i64
// CHECK-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, ptr [[ELEMS]], i64 [[IDX_EXT]]
// CHECK-NEXT: br label [[BOUNDSCHECK_CONT]]
// CHECK: boundscheck.cont:
// CHECK-NEXT: [[AGG_TEMP1_SROA_3_0:%.*]] = phi ptr [ [[ADD_PTR]], [[BOUNDSCHECK_NOTNULL]] ], [ null, [[ENTRY:%.*]] ]
// CHECK-NEXT: [[DOTNOT187:%.*]] = icmp eq ptr [[SRC:%.*]], null, {{!annotation ![0-9]+}}
// CHECK-NEXT: br i1 [[DOTNOT187]], label [[BOUNDSCHECK_CONT11:%.*]], label [[BOUNDSCHECK_NOTNULL4:%.*]], {{!annotation ![0-9]+}}
// CHECK: boundscheck.notnull4:
// CHECK-NEXT: [[ELEMS5:%.*]] = getelementptr inbounds nuw i8, ptr [[SRC]], i64 4
// CHECK-NEXT: [[TMP1:%.*]] = load i32, ptr [[SRC]], align 4, {{!tbaa ![0-9]+}}
// CHECK-NEXT: [[IDX_EXT8:%.*]] = sext i32 [[TMP1]] to i64
// CHECK-NEXT: [[ADD_PTR9:%.*]] = getelementptr inbounds i32, ptr [[ELEMS5]], i64 [[IDX_EXT8]]
// CHECK-NEXT: br label [[BOUNDSCHECK_CONT11]]
// CHECK: boundscheck.cont11:
// CHECK-NEXT: [[AGG_TEMP3_SROA_3_0:%.*]] = phi ptr [ [[ADD_PTR9]], [[BOUNDSCHECK_NOTNULL4]] ], [ null, [[BOUNDSCHECK_CONT]] ]
// CHECK-NEXT: [[CONV:%.*]] = zext i32 [[SIZE:%.*]] to i64
// CHECK-NEXT: [[CMP_NOT:%.*]] = icmp ugt ptr [[SRC]], [[AGG_TEMP3_SROA_3_0]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_LHS_CAST:%.*]] = ptrtoint ptr [[AGG_TEMP3_SROA_3_0]] to i64, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_RHS_CAST:%.*]] = ptrtoint ptr [[SRC]] to i64, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_SUB:%.*]] = sub i64 [[SUB_PTR_LHS_CAST]], [[SUB_PTR_RHS_CAST]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[CMP83_NOT:%.*]] = icmp ult i64 [[SUB_PTR_SUB]], [[CONV]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[OR_COND:%.*]] = or i1 [[CMP_NOT]], [[CMP83_NOT]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[CMP101_NOT:%.*]] = icmp ugt ptr [[DEST]], [[AGG_TEMP1_SROA_3_0]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[OR_COND190:%.*]] = select i1 [[OR_COND]], i1 true, i1 [[CMP101_NOT]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_LHS_CAST153:%.*]] = ptrtoint ptr [[AGG_TEMP1_SROA_3_0]] to i64, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_RHS_CAST154:%.*]] = ptrtoint ptr [[DEST]] to i64, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_SUB155:%.*]] = sub i64 [[SUB_PTR_LHS_CAST153]], [[SUB_PTR_RHS_CAST154]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[CMP156_NOT:%.*]] = icmp ult i64 [[SUB_PTR_SUB155]], [[CONV]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[OR_COND191:%.*]] = select i1 [[OR_COND190]], i1 true, i1 [[CMP156_NOT]], {{!annotation ![0-9]+}}
// CHECK-NEXT: br i1 [[OR_COND191]], label [[TRAP:%.*]], label [[CONT159:%.*]], {{!annotation ![0-9]+}}
// CHECK: trap:
// CHECK-NEXT: tail call void @llvm.ubsantrap(i8 25) #[[ATTR4]], {{!annotation ![0-9]+}}
// CHECK-NEXT: unreachable, {{!annotation ![0-9]+}}
// CHECK: cont159:
// CHECK-NEXT: tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 [[DEST]], ptr align 1 [[SRC]], i64 [[CONV]], i1 false)
// CHECK-NEXT: [[DOTNOT188:%.*]] = icmp ne ptr [[DEST]], null, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[DOTNOT189:%.*]] = icmp eq i32 [[SIZE]], 0, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[OR_COND192:%.*]] = and i1 [[DOTNOT188]], [[DOTNOT189]], {{!annotation ![0-9]+}}
// CHECK-NEXT: br i1 [[OR_COND192]], label [[TRAP]], label [[CONT185:%.*]], {{!annotation ![0-9]+}}
// CHECK: cont185:
// CHECK-NEXT: ret ptr [[DEST]]
//
void *cpy(flex_t *dest, const flex_t *src, unsigned size) {
return __builtin_memcpy(dest, src, size);
}
// CHECK-LABEL: @pcpy(
// CHECK-NEXT: entry:
// CHECK-NEXT: [[DOTNOT:%.*]] = icmp eq ptr [[DEST:%.*]], null, {{!annotation ![0-9]+}}
// CHECK-NEXT: br i1 [[DOTNOT]], label [[BOUNDSCHECK_CONT:%.*]], label [[BOUNDSCHECK_NOTNULL:%.*]], {{!annotation ![0-9]+}}
// CHECK: boundscheck.notnull:
// CHECK-NEXT: [[ELEMS:%.*]] = getelementptr inbounds nuw i8, ptr [[DEST]], i64 4
// CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[DEST]], align 4, {{!tbaa ![0-9]+}}
// CHECK-NEXT: [[IDX_EXT:%.*]] = sext i32 [[TMP0]] to i64
// CHECK-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, ptr [[ELEMS]], i64 [[IDX_EXT]]
// CHECK-NEXT: br label [[BOUNDSCHECK_CONT]]
// CHECK: boundscheck.cont:
// CHECK-NEXT: [[AGG_TEMP1_SROA_3_0:%.*]] = phi ptr [ [[ADD_PTR]], [[BOUNDSCHECK_NOTNULL]] ], [ null, [[ENTRY:%.*]] ]
// CHECK-NEXT: [[DOTNOT175:%.*]] = icmp eq ptr [[SRC:%.*]], null, {{!annotation ![0-9]+}}
// CHECK-NEXT: br i1 [[DOTNOT175]], label [[BOUNDSCHECK_CONT11:%.*]], label [[BOUNDSCHECK_NOTNULL4:%.*]], {{!annotation ![0-9]+}}
// CHECK: boundscheck.notnull4:
// CHECK-NEXT: [[ELEMS5:%.*]] = getelementptr inbounds nuw i8, ptr [[SRC]], i64 4
// CHECK-NEXT: [[TMP1:%.*]] = load i32, ptr [[SRC]], align 4, {{!tbaa ![0-9]+}}
// CHECK-NEXT: [[IDX_EXT8:%.*]] = sext i32 [[TMP1]] to i64
// CHECK-NEXT: [[ADD_PTR9:%.*]] = getelementptr inbounds i32, ptr [[ELEMS5]], i64 [[IDX_EXT8]]
// CHECK-NEXT: br label [[BOUNDSCHECK_CONT11]]
// CHECK: boundscheck.cont11:
// CHECK-NEXT: [[AGG_TEMP3_SROA_3_0:%.*]] = phi ptr [ [[ADD_PTR9]], [[BOUNDSCHECK_NOTNULL4]] ], [ null, [[BOUNDSCHECK_CONT]] ]
// CHECK-NEXT: [[CONV:%.*]] = zext i32 [[SIZE:%.*]] to i64
// CHECK-NEXT: [[CMP_NOT:%.*]] = icmp ugt ptr [[SRC]], [[AGG_TEMP3_SROA_3_0]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_LHS_CAST:%.*]] = ptrtoint ptr [[AGG_TEMP3_SROA_3_0]] to i64, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_RHS_CAST:%.*]] = ptrtoint ptr [[SRC]] to i64, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_SUB:%.*]] = sub i64 [[SUB_PTR_LHS_CAST]], [[SUB_PTR_RHS_CAST]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[CMP83_NOT:%.*]] = icmp ult i64 [[SUB_PTR_SUB]], [[CONV]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[OR_COND:%.*]] = or i1 [[CMP_NOT]], [[CMP83_NOT]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[CMP101_NOT:%.*]] = icmp ugt ptr [[DEST]], [[AGG_TEMP1_SROA_3_0]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[OR_COND176:%.*]] = select i1 [[OR_COND]], i1 true, i1 [[CMP101_NOT]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_LHS_CAST153:%.*]] = ptrtoint ptr [[AGG_TEMP1_SROA_3_0]] to i64, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_RHS_CAST154:%.*]] = ptrtoint ptr [[DEST]] to i64, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_SUB155:%.*]] = sub i64 [[SUB_PTR_LHS_CAST153]], [[SUB_PTR_RHS_CAST154]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[CMP156_NOT:%.*]] = icmp ult i64 [[SUB_PTR_SUB155]], [[CONV]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[OR_COND177:%.*]] = select i1 [[OR_COND176]], i1 true, i1 [[CMP156_NOT]], {{!annotation ![0-9]+}}
// CHECK-NEXT: br i1 [[OR_COND177]], label [[TRAP:%.*]], label [[CONT159:%.*]], {{!annotation ![0-9]+}}
// CHECK: trap:
// CHECK-NEXT: tail call void @llvm.ubsantrap(i8 25) #[[ATTR4]], {{!annotation ![0-9]+}}
// CHECK-NEXT: unreachable, {{!annotation ![0-9]+}}
// CHECK: cont159:
// CHECK-NEXT: tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 [[DEST]], ptr align 1 [[SRC]], i64 [[CONV]], i1 false)
// CHECK-NEXT: [[TMP2:%.*]] = getelementptr inbounds nuw i8, ptr [[DEST]], i64 [[CONV]]
// CHECK-NEXT: ret ptr [[TMP2]]
//
void *__unsafe_indexable pcpy(flex_t *dest, const flex_t *src, unsigned size) {
return __builtin_mempcpy(dest, src, size);
}
// CHECK-LABEL: @move(
// CHECK-NEXT: entry:
// CHECK-NEXT: [[DOTNOT:%.*]] = icmp eq ptr [[DEST:%.*]], null, {{!annotation ![0-9]+}}
// CHECK-NEXT: br i1 [[DOTNOT]], label [[BOUNDSCHECK_CONT:%.*]], label [[BOUNDSCHECK_NOTNULL:%.*]], {{!annotation ![0-9]+}}
// CHECK: boundscheck.notnull:
// CHECK-NEXT: [[ELEMS:%.*]] = getelementptr inbounds nuw i8, ptr [[DEST]], i64 4
// CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[DEST]], align 4, {{!tbaa ![0-9]+}}
// CHECK-NEXT: [[IDX_EXT:%.*]] = sext i32 [[TMP0]] to i64
// CHECK-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, ptr [[ELEMS]], i64 [[IDX_EXT]]
// CHECK-NEXT: br label [[BOUNDSCHECK_CONT]]
// CHECK: boundscheck.cont:
// CHECK-NEXT: [[AGG_TEMP1_SROA_3_0:%.*]] = phi ptr [ [[ADD_PTR]], [[BOUNDSCHECK_NOTNULL]] ], [ null, [[ENTRY:%.*]] ]
// CHECK-NEXT: [[DOTNOT187:%.*]] = icmp eq ptr [[SRC:%.*]], null, {{!annotation ![0-9]+}}
// CHECK-NEXT: br i1 [[DOTNOT187]], label [[BOUNDSCHECK_CONT11:%.*]], label [[BOUNDSCHECK_NOTNULL4:%.*]], {{!annotation ![0-9]+}}
// CHECK: boundscheck.notnull4:
// CHECK-NEXT: [[ELEMS5:%.*]] = getelementptr inbounds nuw i8, ptr [[SRC]], i64 4
// CHECK-NEXT: [[TMP1:%.*]] = load i32, ptr [[SRC]], align 4, {{!tbaa ![0-9]+}}
// CHECK-NEXT: [[IDX_EXT8:%.*]] = sext i32 [[TMP1]] to i64
// CHECK-NEXT: [[ADD_PTR9:%.*]] = getelementptr inbounds i32, ptr [[ELEMS5]], i64 [[IDX_EXT8]]
// CHECK-NEXT: br label [[BOUNDSCHECK_CONT11]]
// CHECK: boundscheck.cont11:
// CHECK-NEXT: [[AGG_TEMP3_SROA_3_0:%.*]] = phi ptr [ [[ADD_PTR9]], [[BOUNDSCHECK_NOTNULL4]] ], [ null, [[BOUNDSCHECK_CONT]] ]
// CHECK-NEXT: [[CONV:%.*]] = zext i32 [[SIZE:%.*]] to i64
// CHECK-NEXT: [[CMP_NOT:%.*]] = icmp ugt ptr [[SRC]], [[AGG_TEMP3_SROA_3_0]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_LHS_CAST:%.*]] = ptrtoint ptr [[AGG_TEMP3_SROA_3_0]] to i64, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_RHS_CAST:%.*]] = ptrtoint ptr [[SRC]] to i64, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_SUB:%.*]] = sub i64 [[SUB_PTR_LHS_CAST]], [[SUB_PTR_RHS_CAST]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[CMP83_NOT:%.*]] = icmp ult i64 [[SUB_PTR_SUB]], [[CONV]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[OR_COND:%.*]] = or i1 [[CMP_NOT]], [[CMP83_NOT]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[CMP101_NOT:%.*]] = icmp ugt ptr [[DEST]], [[AGG_TEMP1_SROA_3_0]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[OR_COND190:%.*]] = select i1 [[OR_COND]], i1 true, i1 [[CMP101_NOT]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_LHS_CAST153:%.*]] = ptrtoint ptr [[AGG_TEMP1_SROA_3_0]] to i64, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_RHS_CAST154:%.*]] = ptrtoint ptr [[DEST]] to i64, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[SUB_PTR_SUB155:%.*]] = sub i64 [[SUB_PTR_LHS_CAST153]], [[SUB_PTR_RHS_CAST154]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[CMP156_NOT:%.*]] = icmp ult i64 [[SUB_PTR_SUB155]], [[CONV]], {{!annotation ![0-9]+}}
// CHECK-NEXT: [[OR_COND191:%.*]] = select i1 [[OR_COND190]], i1 true, i1 [[CMP156_NOT]], {{!annotation ![0-9]+}}
// CHECK-NEXT: br i1 [[OR_COND191]], label [[TRAP:%.*]], label [[CONT159:%.*]], {{!annotation ![0-9]+}}
// CHECK: trap:
// CHECK-NEXT: tail call void @llvm.ubsantrap(i8 25) #[[ATTR4]], {{!annotation ![0-9]+}}
// CHECK-NEXT: unreachable, {{!annotation ![0-9]+}}
// CHECK: cont159:
// CHECK-NEXT: tail call void @llvm.memmove.p0.p0.i64(ptr align 1 [[DEST]], ptr align 1 [[SRC]], i64 [[CONV]], i1 false)
// CHECK-NEXT: [[DOTNOT188:%.*]] = icmp ne ptr [[DEST]], null, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[DOTNOT189:%.*]] = icmp eq i32 [[SIZE]], 0, {{!annotation ![0-9]+}}
// CHECK-NEXT: [[OR_COND192:%.*]] = and i1 [[DOTNOT188]], [[DOTNOT189]], {{!annotation ![0-9]+}}
// CHECK-NEXT: br i1 [[OR_COND192]], label [[TRAP]], label [[CONT185:%.*]], {{!annotation ![0-9]+}}
// CHECK: cont185:
// CHECK-NEXT: ret ptr [[DEST]]
//
void *move(flex_t *dest, const flex_t *src, unsigned size) {
return __builtin_memmove(dest, src, size);
}