authorgravatar for william@sengir.comWilliam Sengir <william@sengir.com> 2022-03-20 00:06:23-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-03-21 16:54:19-07:00
log2d8fef5680dc8218596e701f91d918c4aa7215bc
tree096958eea6c9f2e084bec480b0e748bc106db58a
parent4e357151a54c9a2f373cef59e2718a61cfbe3658

stage2: make bool binop AIR return types based on operand type

This allows vector-of-bools operands to return a vector-of-bools.

1 files changed, 2 insertions(+), 2 deletions(-)

src/Air.zig+2-2
...@@ -904,6 +904,8 @@ pub fn typeOfIndex(air: Air, inst: Air.Inst.Index) Type {...@@ -904,6 +904,8 @@ pub fn typeOfIndex(air: Air, inst: Air.Inst.Index) Type {
904 .shl_sat,904 .shl_sat,
905 .min,905 .min,
906 .max,906 .max,
907 .bool_and,
908 .bool_or,
907 => return air.typeOf(datas[inst].bin_op.lhs),909 => return air.typeOf(datas[inst].bin_op.lhs),
908910
909 .sqrt,911 .sqrt,
...@@ -935,8 +937,6 @@ pub fn typeOfIndex(air: Air, inst: Air.Inst.Index) Type {...@@ -935,8 +937,6 @@ pub fn typeOfIndex(air: Air, inst: Air.Inst.Index) Type {
935 .is_non_err,937 .is_non_err,
936 .is_err_ptr,938 .is_err_ptr,
937 .is_non_err_ptr,939 .is_non_err_ptr,
938 .bool_and,
939 .bool_or,
940 => return Type.initTag(.bool),940 => return Type.initTag(.bool),
941941
942 .const_ty => return Type.initTag(.type),942 .const_ty => return Type.initTag(.type),