2013-12-04 11:41:15 +08:00
|
|
|
// REQUIRES: powerpc-registered-target
|
2016-12-23 08:23:01 +08:00
|
|
|
// RUN: %clang_cc1 -triple powerpc-apple-macosx10.4.0 -emit-llvm -o - %s -O2 -disable-llvm-passes | 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;
|
|
|
|
}
|
|
|
|
|
2013-08-15 14:47:53 +08:00
|
|
|
// CHECK-LABEL: define void @f(
|
2015-02-28 05:19:58 +08:00
|
|
|
// CHECK: [[FROMMEM:%.*]] = load i32, i32* %
|
2012-11-13 10:05:15 +08:00
|
|
|
// CHECK: [[BOOLVAL:%.*]] = trunc i32 [[FROMMEM]] to i1
|
|
|
|
// CHECK: [[TOMEM:%.*]] = zext i1 [[BOOLVAL]] to i32
|
|
|
|
// CHECK: store i32 [[TOMEM]]
|
|
|
|
// CHECK: ret void
|
|
|
|
|
2014-12-16 03:10:08 +08:00
|
|
|
// CHECK: i32 0, i32 2}
|