[LLVM][IR] Use splat syntax when printing ConstantExpr based splats. (#116856)
[llvm-project.git] / clang / test / CodeGen / ubsan-conditional.c
blob55c1bd6fad72eb616a6fab31782f088aa6ba5686
1 // RUN: %clang_cc1 %s -emit-llvm -fsanitize=float-divide-by-zero -o - | FileCheck %s
3 _Bool b;
4 // CHECK: @f(
5 double f(void) {
6 // CHECK: %[[B:.*]] = load {{.*}} @b
7 // CHECK: %[[COND:.*]] = trunc {{.*}} %[[B]] to i1
8 // CHECK: br i1 %[[COND]]
9 return b ? 0.0 / 0.0 : 0.0;