summaryrefslogtreecommitdiff
path: root/test/CodeGen/kr-func-promote.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/kr-func-promote.c')
-rw-r--r--test/CodeGen/kr-func-promote.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/CodeGen/kr-func-promote.c b/test/CodeGen/kr-func-promote.c
index 8e55dc91edf4d..122e6435d0b50 100644
--- a/test/CodeGen/kr-func-promote.c
+++ b/test/CodeGen/kr-func-promote.c
@@ -1,6 +1,12 @@
// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
-// CHECK: i32 @a(i32)
+// CHECK: i32 @a(i32
int a();
int a(x) short x; {return x;}
+// CHECK: void @b(double
+// CHECK: %[[ADDR:.*]] = alloca float, align 4
+// CHECK: %[[TRUNC:.*]] = fptrunc double %0 to float
+// CHECK: store float %[[TRUNC]], float* %[[ADDR]], align 4
+void b();
+void b(f) float f; {}