Debian Codegraph @

clang/test/CodeGenHLSL/Bool.hlsl

raw
1 // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.3-library -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
2
3 // CHECK-LABEL: define hidden noundef i1 {{.*}}fn{{.*}}(i1 noundef %x)
4 // CHECK: [[X:%.*]] = alloca i32, align 4
5 // CHECK-NEXT: [[Y:%.*]] = zext i1 {{%.*}} to i32
6 // CHECK-NEXT: store i32 [[Y]], ptr [[X]], align 4
7 // CHECK-NEXT: [[Z:%.*]] = load i32, ptr [[X]], align 4
8 // CHECK-NEXT: [[L:%.*]] = trunc i32 [[Z]] to i1
9 // CHECK-NEXT: ret i1 [[L]]
10 bool fn(bool x) {
11 return x;
12 }