| ... | ... | @@ -5197,10 +5197,9 @@ pub const WipFunction = struct { |
| 5197 | 5197 | ) Allocator.Error!Value { |
| 5198 | 5198 | const scalar_ty = try ty.changeLength(1, self.builder); |
| 5199 | 5199 | const mask_ty = try ty.changeScalar(.i32, self.builder); |
| 5200 | | const zero = try self.builder.intConst(.i32, 0); |
| 5201 | 5200 | const poison = try self.builder.poisonValue(scalar_ty); |
| 5202 | | const mask = try self.builder.splatValue(mask_ty, zero); |
| 5203 | | const scalar = try self.insertElement(poison, elem, zero.toValue(), name); |
| 5201 | const mask = try self.builder.splatValue(mask_ty, .@"0"); |
| 5202 | const scalar = try self.insertElement(poison, elem, .@"0", name); |
| 5204 | 5203 | return self.shuffleVector(scalar, poison, mask, name); |
| 5205 | 5204 | } |
| 5206 | 5205 | |
| ... | ... | @@ -5278,7 +5277,10 @@ pub const WipFunction = struct { |
| 5278 | 5277 | }, |
| 5279 | 5278 | .data = self.addExtraAssumeCapacity(Instruction.Alloca{ |
| 5280 | 5279 | .type = ty, |
| 5281 | | .len = len, |
| 5280 | .len = switch (len) { |
| 5281 | .none => .@"1", |
| 5282 | else => len, |
| 5283 | }, |
| 5282 | 5284 | .info = .{ .alignment = alignment, .addr_space = addr_space }, |
| 5283 | 5285 | }), |
| 5284 | 5286 | }); |
| ... | ... | @@ -6708,6 +6710,8 @@ pub const FastMathKind = enum { |
| 6708 | 6710 | pub const Constant = enum(u32) { |
| 6709 | 6711 | false, |
| 6710 | 6712 | true, |
| 6713 | @"0", |
| 6714 | @"1", |
| 6711 | 6715 | none, |
| 6712 | 6716 | no_init = (1 << 30) - 1, |
| 6713 | 6717 | _, |
| ... | ... | @@ -7492,6 +7496,8 @@ pub const Value = enum(u32) { |
| 7492 | 7496 | none = std.math.maxInt(u31), |
| 7493 | 7497 | false = first_constant + @intFromEnum(Constant.false), |
| 7494 | 7498 | true = first_constant + @intFromEnum(Constant.true), |
| 7499 | @"0" = first_constant + @intFromEnum(Constant.@"0"), |
| 7500 | @"1" = first_constant + @intFromEnum(Constant.@"1"), |
| 7495 | 7501 | _, |
| 7496 | 7502 | |
| 7497 | 7503 | const first_constant = 1 << 30; |
| ... | ... | @@ -8336,6 +8342,8 @@ pub fn init(options: Options) Allocator.Error!Builder { |
| 8336 | 8342 | |
| 8337 | 8343 | assert(try self.intConst(.i1, 0) == .false); |
| 8338 | 8344 | assert(try self.intConst(.i1, 1) == .true); |
| 8345 | assert(try self.intConst(.i32, 0) == .@"0"); |
| 8346 | assert(try self.intConst(.i32, 1) == .@"1"); |
| 8339 | 8347 | assert(try self.noneConst(.token) == .none); |
| 8340 | 8348 | if (!self.strip) assert(try self.debugNone() == .none); |
| 8341 | 8349 | |
| ... | ... | @@ -9519,7 +9527,10 @@ pub fn printUnbuffered( |
| 9519 | 9527 | instruction_index.name(&function).fmt(self), |
| 9520 | 9528 | @tagName(tag), |
| 9521 | 9529 | extra.type.fmt(self), |
| 9522 | | extra.len.fmt(function_index, self), |
| 9530 | Value.fmt(switch (extra.len) { |
| 9531 | .@"1" => .none, |
| 9532 | else => extra.len, |
| 9533 | }, function_index, self), |
| 9523 | 9534 | extra.info.alignment, |
| 9524 | 9535 | extra.info.addr_space, |
| 9525 | 9536 | }); |
| ... | ... | @@ -14510,8 +14521,8 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co |
| 14510 | 14521 | const alignment = extra.info.alignment.toLlvm(); |
| 14511 | 14522 | try function_block.writeAbbrev(FunctionBlock.Alloca{ |
| 14512 | 14523 | .inst_type = extra.type, |
| 14513 | | .len_type = if (extra.len == .none) .i1 else extra.len.typeOf(@enumFromInt(func_index), self), |
| 14514 | | .len_value = adapter.getValueIndex(if (extra.len == .none) Constant.true.toValue() else extra.len), |
| 14524 | .len_type = extra.len.typeOf(@enumFromInt(func_index), self), |
| 14525 | .len_value = adapter.getValueIndex(extra.len), |
| 14515 | 14526 | .flags = .{ |
| 14516 | 14527 | .align_lower = @truncate(alignment), |
| 14517 | 14528 | .inalloca = kind == .@"alloca inalloca", |