minix/external/bsd/llvm/dist/clang/test/CodeGen/bool_test.c
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

18 lines
534 B
C

// REQUIRES: ppc32-registered-target
// RUN: %clang_cc1 -triple powerpc-apple-macosx10.4.0 -emit-llvm -o - %s -O2 -disable-llvm-optzns | FileCheck %s
int boolsize = sizeof(_Bool);
// CHECK: boolsize = global i32 4, align 4
void f(_Bool *x, _Bool *y) {
*x = *y;
}
// CHECK-LABEL: 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}