diff options
Diffstat (limited to 'test/CodeGen/bool_test.c')
-rw-r--r-- | test/CodeGen/bool_test.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/test/CodeGen/bool_test.c b/test/CodeGen/bool_test.c index 715f846..83d8330 100644 --- a/test/CodeGen/bool_test.c +++ b/test/CodeGen/bool_test.c @@ -1,6 +1,18 @@ // REQUIRES: ppc32-registered-target -// RUN: %clang_cc1 -triple powerpc-apple-darwin -emit-llvm -o - %s| FileCheck -check-prefix=DARWINPPC-CHECK %s +// RUN: %clang_cc1 -triple powerpc-apple-macosx10.4.0 -emit-llvm -o - %s -O2 -disable-llvm-optzns | FileCheck %s int boolsize = sizeof(_Bool); -//DARWINPPC-CHECK: boolsize = global i32 4, align 4 +// CHECK: boolsize = global i32 4, align 4 +void f(_Bool *x, _Bool *y) { + *x = *y; +} + +// CHECK: define void @f( +// CHECK: [[FROMMEM:%.*]] = load i32* % +// CHECK: [[BOOLVAL:%.*]] = trunc i32 [[FROMMEM]] to i1 +// CHECK: [[TOMEM:%.*]] = zext i1 [[BOOLVAL]] to i32 +// CHECK: store i32 [[TOMEM]] +// CHECK: ret void + +// CHECK: metadata !{i32 0, i32 2} |