2012-07-10 02:34:21 +08:00
|
|
|
// REQUIRES: ppc32-registered-target
|
2012-11-13 10:05:15 +08:00
|
|
|
// RUN: %clang_cc1 -triple powerpc-apple-macosx10.4.0 -emit-llvm -o - %s -O2 -disable-llvm-optzns | FileCheck %s
|
2011-01-06 16:27:10 +08:00
|
|
|
|
|
|
|
int boolsize = sizeof(_Bool);
|
2012-11-13 10:05:15 +08:00
|
|
|
// CHECK: boolsize = global i32 4, align 4
|
2011-01-06 16:27:10 +08:00
|
|
|
|
2012-11-13 10:05:15 +08:00
|
|
|
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}
|