2013-12-04 11:41:15 +08:00
|
|
|
// REQUIRES: powerpc-registered-target
|
2018-08-28 03:53:19 +08:00
|
|
|
// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -emit-llvm -o - %s -O2 -disable-llvm-passes | FileCheck %s
|
2011-01-06 16:27:10 +08:00
|
|
|
|
|
|
|
int boolsize = sizeof(_Bool);
|
2020-12-31 16:27:11 +08:00
|
|
|
// CHECK: boolsize ={{.*}} global i32 1, 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;
|
|
|
|
}
|
|
|
|
|
2020-12-31 16:27:11 +08:00
|
|
|
// CHECK-LABEL: define{{.*}} void @f(
|
2018-08-28 03:53:19 +08:00
|
|
|
// CHECK: [[FROMMEM:%.*]] = load i8, i8* %
|
|
|
|
// CHECK: [[BOOLVAL:%.*]] = trunc i8 [[FROMMEM]] to i1
|
|
|
|
// CHECK: [[TOMEM:%.*]] = zext i1 [[BOOLVAL]] to i8
|
|
|
|
// CHECK: store i8 [[TOMEM]]
|
2012-11-13 10:05:15 +08:00
|
|
|
// CHECK: ret void
|
|
|
|
|
2018-08-28 03:53:19 +08:00
|
|
|
// CHECK: i8 0, i8 2}
|