Skip to content

Commit

Permalink
test: Expand choose expr test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jezurko committed Sep 4, 2024
1 parent d131658 commit d062327
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion test/vast/Dialect/HighLevel/choose-expr-a.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,19 @@ void fn() {
// CHECK: hl.value.yield {{%.*}} : !hl.lvalue<!hl.int>
int z = __builtin_choose_expr(0, x, y);
// CHECK: hl.choose_expr cond true : !hl.lvalue<!hl.int> {
int w = __builtin_choose_expr(1, x, y);
z = __builtin_choose_expr(1, x, y);

// CHECK: hl.choose_expr cond true : !hl.lvalue<!hl.int> {
// CHECK: hl.value.yield {{%.*}} : !hl.lvalue<!hl.int>
// CHECK: hl.value.yield {{%.*}} : !hl.void
z = __builtin_choose_expr(1, x, (void) 0);
// CHECK: hl.choose_expr cond false : !hl.lvalue<!hl.int> {
// CHECK: hl.value.yield {{%.*}} : !hl.void
// CHECK: hl.value.yield {{%.*}} : !hl.lvalue<!hl.int>
z = __builtin_choose_expr(0, (void) 0, x);

// CHECK: hl.choose_expr cond true : !hl.lvalue<!hl.int> {
// CHECK: hl.value.yield {{%.*}} : !hl.lvalue<!hl.int>
// CHECK: hl.value.yield {{%.*}} : !hl.char
z = __builtin_choose_expr(1, x, (char) 0);
}

0 comments on commit d062327

Please sign in to comment.