| ... | ... | @@ -24295,6 +24295,14 @@ fn zirSplat(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.I |
| 24295 | 24295 | |
| 24296 | 24296 | if (!dest_ty.isVector(mod)) return sema.fail(block, src, "expected vector type, found '{}'", .{dest_ty.fmt(mod)}); |
| 24297 | 24297 | |
| 24298 | if (!dest_ty.hasRuntimeBits(mod)) { |
| 24299 | const empty_aggregate = try mod.intern(.{ .aggregate = .{ |
| 24300 | .ty = dest_ty.toIntern(), |
| 24301 | .storage = .{ .elems = &[_]InternPool.Index{} }, |
| 24302 | } }); |
| 24303 | return Air.internedToRef(empty_aggregate); |
| 24304 | } |
| 24305 | |
| 24298 | 24306 | const operand = try sema.resolveInst(extra.rhs); |
| 24299 | 24307 | const scalar_ty = dest_ty.childType(mod); |
| 24300 | 24308 | const scalar = try sema.coerce(block, scalar_ty, operand, scalar_src); |