Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / PowerPC / bool_test.c
blobd3e7db3c66dad7f9b6021eb9664e598493fcb6ff
1 // REQUIRES: powerpc-registered-target
2 // RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -emit-llvm -o - %s -O2 -disable-llvm-passes | FileCheck %s
4 int boolsize = sizeof(_Bool);
5 // CHECK: boolsize ={{.*}} global i32 1, align 4
7 void f(_Bool *x, _Bool *y) {
8 *x = *y;
11 // CHECK-LABEL: define{{.*}} void @f(
12 // CHECK: [[FROMMEM:%.*]] = load i8, ptr %
13 // CHECK: [[BOOLVAL:%.*]] = trunc i8 [[FROMMEM]] to i1
14 // CHECK: [[TOMEM:%.*]] = zext i1 [[BOOLVAL]] to i8
15 // CHECK: store i8 [[TOMEM]]
16 // CHECK: ret void
18 // CHECK: i8 0, i8 2}