Skip to content

Commit 7e38017

Browse files
committed
Eliminate bool vectors in D3D12 compute.
1 parent 2d0580e commit 7e38017

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/CodeGen_D3D12Compute_Dev.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,14 @@ void CodeGen_D3D12Compute_Dev::CodeGen_D3D12Compute_C::visit(const Store *op) {
10581058
}
10591059

10601060
void CodeGen_D3D12Compute_Dev::CodeGen_D3D12Compute_C::visit(const Select *op) {
1061+
if (op->type.is_vector()) {
1062+
// A vector of bool was recursively introduced while
1063+
// performing codegen. Eliminate it.
1064+
Expr equiv = eliminate_bool_vectors(op);
1065+
equiv.accept(this);
1066+
return;
1067+
}
1068+
10611069
ostringstream rhs;
10621070
string true_val = print_expr(op->true_value);
10631071
string false_val = print_expr(op->false_value);

0 commit comments

Comments
 (0)