1 // RUN: %clang_cc1 -triple x86_64-gnu-linux -emit-llvm %s -o - | FileCheck %s
3 // CHECK-LABEL: define{{.*}} void @{{.*}}test4{{.*}}(float
5 // CHECK-NEXT: [[TMP2:%.*]] = alloca float, align 4
6 // CHECK-NEXT: store float [[TMP1:%.*]], ptr [[TMP2:%.*]], align 4
7 // CHECK-NEXT: ret void
9 // CHECK-LABEL: define{{.*}} void @{{.*}}test4{{.*}}(i32
11 // CHECK-NEXT: [[TMP2:%.*]] = alloca i32, align 4
12 // CHECK-NEXT: store i32 [[TMP1:%.*]], ptr [[TMP2:%.*]], align 4
13 // CHECK-NEXT: ret void
15 // CHECK-LABEL: define{{.*}} void @{{.*}}test{{.*}}(
17 // CHECK-NEXT: [[TMP1:%.*]] = alloca i32, align 4
18 // CHECK-NEXT: [[TMP2:%.*]] = alloca float, align 4
19 // CHECK-NEXT: [[TMP3:%.*]] = load i32, ptr [[TMP1:%.*]], align 4
20 // CHECK-NEXT: [[TMP4:%.*]] = freeze i32 [[TMP3:%.*]]
21 // CHECK-NEXT: call void @{{.*}}test4{{.*}}(i32 noundef [[TMP4:%.*]])
22 // CHECK-NEXT: [[TMP5:%.*]] = load float, ptr [[TMP2:%.*]], align 4
23 // CHECK-NEXT: [[TMP6:%.*]] = freeze float [[TMP5:%.*]]
24 // CHECK-NEXT: call void @{{.*}}test4{{.*}}(float noundef [[TMP6:%.*]])
25 // CHECK-NEXT: ret void
28 void test4(T
__attribute__((maybe_undef
)) arg
) {
33 void test4
<float>(float arg
);
36 void test4
<int>(int arg
);