From 2d8fef5680dc8218596e701f91d918c4aa7215bc Mon Sep 17 00:00:00 2001 From: William Sengir Date: Sun, 20 Mar 2022 00:06:23 -0700 Subject: stage2: make bool binop AIR return types based on operand type This allows vector-of-bools operands to return a vector-of-bools. --- src/Air.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Air.zig b/src/Air.zig index 8c24108abd..e0f765ddc0 100644 --- a/src/Air.zig +++ b/src/Air.zig @@ -904,6 +904,8 @@ pub fn typeOfIndex(air: Air, inst: Air.Inst.Index) Type { .shl_sat, .min, .max, + .bool_and, + .bool_or, => return air.typeOf(datas[inst].bin_op.lhs), .sqrt, @@ -935,8 +937,6 @@ pub fn typeOfIndex(air: Air, inst: Air.Inst.Index) Type { .is_non_err, .is_err_ptr, .is_non_err_ptr, - .bool_and, - .bool_or, => return Type.initTag(.bool), .const_ty => return Type.initTag(.type), -- cgit v1.2.3