| ... | ... | @@ -7514,7 +7514,7 @@ fn resolveGenericInstantiationType( |
| 7514 | 7514 | } |
| 7515 | 7515 | |
| 7516 | 7516 | fn resolveTupleLazyValues(sema: *Sema, block: *Block, src: LazySrcLoc, ty: Type) CompileError!void { |
| 7517 | | if (!ty.isSimpleTuple()) return; |
| 7517 | if (!ty.isSimpleTupleOrAnonStruct()) return; |
| 7518 | 7518 | const tuple = ty.tupleFields(); |
| 7519 | 7519 | for (tuple.values) |field_val, i| { |
| 7520 | 7520 | try sema.resolveTupleLazyValues(block, src, tuple.types[i]); |
| ... | ... | @@ -11771,8 +11771,8 @@ fn zirShl( |
| 11771 | 11771 | // TODO coerce rhs if air_tag is not shl_sat |
| 11772 | 11772 | const rhs_is_comptime_int = try sema.checkIntType(block, rhs_src, scalar_rhs_ty); |
| 11773 | 11773 | |
| 11774 | | const maybe_lhs_val = try sema.resolveMaybeUndefVal(lhs); |
| 11775 | | const maybe_rhs_val = try sema.resolveMaybeUndefVal(rhs); |
| 11774 | const maybe_lhs_val = try sema.resolveMaybeUndefValIntable(lhs); |
| 11775 | const maybe_rhs_val = try sema.resolveMaybeUndefValIntable(rhs); |
| 11776 | 11776 | |
| 11777 | 11777 | if (maybe_rhs_val) |rhs_val| { |
| 11778 | 11778 | if (rhs_val.isUndef()) { |
| ... | ... | @@ -11959,8 +11959,8 @@ fn zirShr( |
| 11959 | 11959 | const target = sema.mod.getTarget(); |
| 11960 | 11960 | const scalar_ty = lhs_ty.scalarType(); |
| 11961 | 11961 | |
| 11962 | | const maybe_lhs_val = try sema.resolveMaybeUndefVal(lhs); |
| 11963 | | const maybe_rhs_val = try sema.resolveMaybeUndefVal(rhs); |
| 11962 | const maybe_lhs_val = try sema.resolveMaybeUndefValIntable(lhs); |
| 11963 | const maybe_rhs_val = try sema.resolveMaybeUndefValIntable(rhs); |
| 11964 | 11964 | |
| 11965 | 11965 | const runtime_src = if (maybe_rhs_val) |rhs_val| rs: { |
| 11966 | 11966 | if (rhs_val.isUndef()) { |
| ... | ... | @@ -19697,7 +19697,7 @@ fn zirTruncate(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Ai |
| 19697 | 19697 | } |
| 19698 | 19698 | } |
| 19699 | 19699 | |
| 19700 | | if (try sema.resolveMaybeUndefVal(operand)) |val| { |
| 19700 | if (try sema.resolveMaybeUndefValIntable(operand)) |val| { |
| 19701 | 19701 | if (val.isUndef()) return sema.addConstUndef(dest_ty); |
| 19702 | 19702 | if (!is_vector) { |
| 19703 | 19703 | return sema.addConstant( |
| ... | ... | @@ -19901,7 +19901,7 @@ fn zirBitReverse(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError! |
| 19901 | 19901 | const operand_src: LazySrcLoc = .{ .node_offset_builtin_call_arg0 = inst_data.src_node }; |
| 19902 | 19902 | const operand = try sema.resolveInst(inst_data.operand); |
| 19903 | 19903 | const operand_ty = sema.typeOf(operand); |
| 19904 | | _ = try sema.checkIntOrVectorAllowComptime(block, operand_ty, operand_src); |
| 19904 | const scalar_ty = try sema.checkIntOrVector(block, operand, operand_src); |
| 19905 | 19905 | |
| 19906 | 19906 | if (try sema.typeHasOnePossibleValue(operand_ty)) |val| { |
| 19907 | 19907 | return sema.addConstant(operand_ty, val); |
| ... | ... | @@ -19909,7 +19909,7 @@ fn zirBitReverse(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError! |
| 19909 | 19909 | |
| 19910 | 19910 | const target = sema.mod.getTarget(); |
| 19911 | 19911 | switch (operand_ty.zigTypeTag()) { |
| 19912 | | .Int, .ComptimeInt => { |
| 19912 | .Int => { |
| 19913 | 19913 | const runtime_src = if (try sema.resolveMaybeUndefVal(operand)) |val| { |
| 19914 | 19914 | if (val.isUndef()) return sema.addConstUndef(operand_ty); |
| 19915 | 19915 | const result_val = try val.bitReverse(operand_ty, target, sema.arena); |
| ... | ... | @@ -19929,7 +19929,7 @@ fn zirBitReverse(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError! |
| 19929 | 19929 | const elems = try sema.arena.alloc(Value, vec_len); |
| 19930 | 19930 | for (elems) |*elem, i| { |
| 19931 | 19931 | const elem_val = val.elemValueBuffer(sema.mod, i, &elem_buf); |
| 19932 | | elem.* = try elem_val.bitReverse(operand_ty, target, sema.arena); |
| 19932 | elem.* = try elem_val.bitReverse(scalar_ty, target, sema.arena); |
| 19933 | 19933 | } |
| 19934 | 19934 | return sema.addConstant( |
| 19935 | 19935 | operand_ty, |