authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2026-06-24 00:39:25-04:00
committergravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2026-07-27 14:35:12-04:00
log1e4b0e0022fcbda51032fe555d948ae59db3f640
tree3e0e5c6265b62289ca13c163c7a8f082b9a63c3d
parentc6ab46cc3effecd18db8b8469de965eafd02e1fd

llvm: update attributes and intrinsics


1 files changed, 758 insertions(+), 453 deletions(-)

lib/std/zig/llvm/Builder.zig+758-453
......@@ -142,8 +142,8 @@ pub const String = enum(u32) {
142142 }
143143
144144 fn fromIndex(index: ?usize) String {
145 return @fromBackingInt(@intCast(@as(u32, @intCast((index orelse return .none) +
146 @backingInt(String.empty)))));
145 return @fromBackingInt(@as(u32, @intCast((index orelse return .none) +
146 @backingInt(String.empty))));
147147 }
148148
149149 fn toIndex(self: String) ?usize {
......@@ -937,6 +937,7 @@ pub const Attribute = union(Kind) {
937937 // Parameter Attributes
938938 zeroext,
939939 signext,
940 noext,
940941 inreg,
941942 byval: Type,
942943 byref: Type,
......@@ -947,6 +948,7 @@ pub const Attribute = union(Kind) {
947948 @"align": Alignment.Lazy,
948949 @"noalias",
949950 nocapture,
951 captures: Captures,
950952 nofree,
951953 nest,
952954 returned,
......@@ -965,6 +967,11 @@ pub const Attribute = union(Kind) {
965967 readnone,
966968 readonly,
967969 writeonly,
970 writable,
971 initializes: []const [2]u64,
972 dead_on_unwind,
973 dead_on_return: ?u32,
974 range: [2]Constant,
968975
969976 // Function Attributes
970977 //alignstack: Alignment.Lazy,
......@@ -974,7 +981,7 @@ pub const Attribute = union(Kind) {
974981 builtin,
975982 cold,
976983 convergent,
977 disable_sanitizer_information,
984 disable_sanitizer_instrumentation,
978985 fn_ret_thunk_extern,
979986 hot,
980987 inlinehint,
......@@ -984,6 +991,7 @@ pub const Attribute = union(Kind) {
984991 naked,
985992 nobuiltin,
986993 nocallback,
994 nodivergencesource,
987995 noduplicate,
988996 //nofree,
989997 noimplicitfloat,
......@@ -1001,6 +1009,7 @@ pub const Attribute = union(Kind) {
10011009 nosanitize_bounds,
10021010 nosanitize_coverage,
10031011 null_pointer_is_valid,
1012 optdebug,
10041013 optforfuzzing,
10051014 optnone,
10061015 optsize,
......@@ -1012,23 +1021,23 @@ pub const Attribute = union(Kind) {
10121021 sanitize_thread,
10131022 sanitize_hwaddress,
10141023 sanitize_memtag,
1024 sanitize_realtime,
1025 sanitize_realtime_blocking,
1026 sanitize_alloc_token,
10151027 speculative_load_hardening,
10161028 speculatable,
10171029 ssp,
10181030 sspstrong,
10191031 sspreq,
10201032 strictfp,
1033 denormal_fpenv,
10211034 uwtable: UwTable,
10221035 nocf_check,
10231036 shadowcallstack,
10241037 mustprogress,
10251038 vscale_range: VScaleRange,
1026
1027 // Global Attributes
1028 no_sanitize_address,
1029 no_sanitize_hwaddress,
1030 //sanitize_memtag,
1031 sanitize_address_dyninit,
1039 nooutline,
1040 nocreateundeforpoison,
10321041
10331042 string: struct { kind: String, value: String },
10341043 none: noreturn,
......@@ -1045,100 +1054,11 @@ pub const Attribute = union(Kind) {
10451054 const storage = self.toStorage(builder);
10461055 if (storage.kind.toString()) |kind| return .{ .string = .{
10471056 .kind = kind,
1048 .value = @fromBackingInt(@intCast(storage.value)),
1057 .value = @fromBackingInt(storage.value),
10491058 } } else return switch (storage.kind) {
1050 inline .zeroext,
1051 .signext,
1052 .inreg,
1053 .byval,
1054 .byref,
1055 .preallocated,
1056 .inalloca,
1057 .sret,
1058 .elementtype,
1059 .@"align",
1060 .@"noalias",
1061 .nocapture,
1062 .nofree,
1063 .nest,
1064 .returned,
1065 .nonnull,
1066 .dereferenceable,
1067 .dereferenceable_or_null,
1068 .swiftself,
1069 .swiftasync,
1070 .swifterror,
1071 .immarg,
1072 .noundef,
1073 .nofpclass,
1074 .alignstack,
1075 .allocalign,
1076 .allocptr,
1077 .readnone,
1078 .readonly,
1079 .writeonly,
1080 //.alignstack,
1081 .allockind,
1082 .allocsize,
1083 .alwaysinline,
1084 .builtin,
1085 .cold,
1086 .convergent,
1087 .disable_sanitizer_information,
1088 .fn_ret_thunk_extern,
1089 .hot,
1090 .inlinehint,
1091 .jumptable,
1092 .memory,
1093 .minsize,
1094 .naked,
1095 .nobuiltin,
1096 .nocallback,
1097 .noduplicate,
1098 //.nofree,
1099 .noimplicitfloat,
1100 .@"noinline",
1101 .nomerge,
1102 .nonlazybind,
1103 .noprofile,
1104 .skipprofile,
1105 .noredzone,
1106 .noreturn,
1107 .norecurse,
1108 .willreturn,
1109 .nosync,
1110 .nounwind,
1111 .nosanitize_bounds,
1112 .nosanitize_coverage,
1113 .null_pointer_is_valid,
1114 .optforfuzzing,
1115 .optnone,
1116 .optsize,
1117 //.preallocated,
1118 .returns_twice,
1119 .safestack,
1120 .sanitize_address,
1121 .sanitize_memory,
1122 .sanitize_thread,
1123 .sanitize_hwaddress,
1124 .sanitize_memtag,
1125 .speculative_load_hardening,
1126 .speculatable,
1127 .ssp,
1128 .sspstrong,
1129 .sspreq,
1130 .strictfp,
1131 .uwtable,
1132 .nocf_check,
1133 .shadowcallstack,
1134 .mustprogress,
1135 .vscale_range,
1136 .no_sanitize_address,
1137 .no_sanitize_hwaddress,
1138 .sanitize_address_dyninit,
1139 => |kind| {
1059 inline else => |kind| {
11401060 const field_name, const field_type = comptime blk: {
1141 @setEvalBranchQuota(10_000);
1061 @setEvalBranchQuota(12_000);
11421062 const info = @typeInfo(Attribute).@"union";
11431063 for (info.field_names, info.field_types) |field_name, field_type| {
11441064 if (std.mem.eql(u8, field_name, @tagName(kind))) break :blk .{ field_name, field_type };
......@@ -1149,14 +1069,17 @@ pub const Attribute = union(Kind) {
11491069 return @unionInit(Attribute, field_name, switch (field_type) {
11501070 void => {},
11511071 u32 => storage.value,
1152 Alignment.Lazy, String, Type, UwTable => @fromBackingInt(@intCast(storage.value)),
1153 AllocKind, AllocSize, FpClass, Memory, VScaleRange => @bitCast(storage.value),
1072 Alignment.Lazy, String, Type, UwTable => @fromBackingInt(storage.value),
1073 AllocKind, AllocSize, Captures, FpClass, Memory, VScaleRange => @bitCast(storage.value),
11541074 else => @compileError("bad payload type: " ++ field_name ++ ": " ++
11551075 @typeName(field_type)),
11561076 });
11571077 },
1158 .string, .none => unreachable,
1159 _ => unreachable,
1078 .initializes,
1079 .dead_on_return,
1080 .range,
1081 => @panic("TODO"),
1082 .string, .none, _ => unreachable,
11601083 };
11611084 }
11621085
......@@ -1174,6 +1097,7 @@ pub const Attribute = union(Kind) {
11741097 switch (attribute) {
11751098 .zeroext,
11761099 .signext,
1100 .noext,
11771101 .inreg,
11781102 .@"noalias",
11791103 .nocapture,
......@@ -1191,11 +1115,13 @@ pub const Attribute = union(Kind) {
11911115 .readnone,
11921116 .readonly,
11931117 .writeonly,
1118 .writable,
1119 .dead_on_unwind,
11941120 .alwaysinline,
11951121 .builtin,
11961122 .cold,
11971123 .convergent,
1198 .disable_sanitizer_information,
1124 .disable_sanitizer_instrumentation,
11991125 .fn_ret_thunk_extern,
12001126 .hot,
12011127 .inlinehint,
......@@ -1204,6 +1130,7 @@ pub const Attribute = union(Kind) {
12041130 .naked,
12051131 .nobuiltin,
12061132 .nocallback,
1133 .nodivergencesource,
12071134 .noduplicate,
12081135 .noimplicitfloat,
12091136 .@"noinline",
......@@ -1220,6 +1147,7 @@ pub const Attribute = union(Kind) {
12201147 .nosanitize_bounds,
12211148 .nosanitize_coverage,
12221149 .null_pointer_is_valid,
1150 .optdebug,
12231151 .optforfuzzing,
12241152 .optnone,
12251153 .optsize,
......@@ -1230,18 +1158,21 @@ pub const Attribute = union(Kind) {
12301158 .sanitize_thread,
12311159 .sanitize_hwaddress,
12321160 .sanitize_memtag,
1161 .sanitize_realtime,
1162 .sanitize_realtime_blocking,
1163 .sanitize_alloc_token,
12331164 .speculative_load_hardening,
12341165 .speculatable,
12351166 .ssp,
12361167 .sspstrong,
12371168 .sspreq,
12381169 .strictfp,
1170 .denormal_fpenv,
12391171 .nocf_check,
12401172 .shadowcallstack,
12411173 .mustprogress,
1242 .no_sanitize_address,
1243 .no_sanitize_hwaddress,
1244 .sanitize_address_dyninit,
1174 .nooutline,
1175 .nocreateundeforpoison,
12451176 => try w.print(" {s}", .{@tagName(attribute)}),
12461177 .byval,
12471178 .byref,
......@@ -1254,6 +1185,45 @@ pub const Attribute = union(Kind) {
12541185 .dereferenceable,
12551186 .dereferenceable_or_null,
12561187 => |size| try w.print(" {s}({d})", .{ @tagName(attribute), size }),
1188 .captures => |captures| {
1189 try w.print(" {s}(", .{@tagName(attribute)});
1190 var need_comma = false;
1191 if (captures == Captures.none) {
1192 if (need_comma) try w.writeAll(", ");
1193 try w.writeAll("none");
1194 need_comma = true;
1195 }
1196 inline for (@typeInfo(Captures).@"struct".field_names) |field_name| {
1197 if (comptime std.mem.eql(u8, field_name, "_")) continue;
1198 const components = @field(captures, field_name);
1199 if (components != Captures.Components.none) {
1200 if (!comptime std.mem.eql(u8, field_name, "other")) {
1201 if (need_comma) try w.writeAll(", ");
1202 try w.writeAll(field_name ++ ": ");
1203 need_comma = false;
1204 }
1205 if (components.address) {
1206 if (need_comma) try w.writeAll(", ");
1207 try w.writeAll("address");
1208 need_comma = true;
1209 } else if (components.address_is_null) {
1210 if (need_comma) try w.writeAll(", ");
1211 try w.writeAll("address_is_null");
1212 need_comma = true;
1213 }
1214 if (components.provenance) {
1215 if (need_comma) try w.writeAll(", ");
1216 try w.writeAll("provenance");
1217 need_comma = true;
1218 } else if (components.read_provenance) {
1219 if (need_comma) try w.writeAll(", ");
1220 try w.writeAll("read_provenance");
1221 need_comma = true;
1222 }
1223 }
1224 }
1225 try w.writeByte(')');
1226 },
12571227 .nofpclass => |fpclass| {
12581228 const Int = @typeInfo(FpClass).@"struct".backing_integer.?;
12591229 try w.print(" {s}(", .{@tagName(attribute)});
......@@ -1281,6 +1251,9 @@ pub const Attribute = union(Kind) {
12811251 try w.print("({d})", .{alignment_bytes});
12821252 }
12831253 },
1254 .initializes => @panic("TODO"),
1255 .dead_on_return => @panic("TODO"),
1256 .range => @panic("TODO"),
12841257 .allockind => |allockind| {
12851258 try w.print(" {t}(\"", .{attribute});
12861259 var any = false;
......@@ -1344,100 +1317,109 @@ pub const Attribute = union(Kind) {
13441317
13451318 pub const Kind = enum(u32) {
13461319 // Parameter Attributes
1347 zeroext = 34,
1348 signext = 24,
1349 inreg = 5,
1350 byval = 3,
1351 byref = 69,
1352 preallocated = 65,
1353 inalloca = 38,
1354 sret = 29, // TODO: ?
1355 elementtype = 77,
1356 @"align" = 1,
1357 @"noalias" = 9,
1358 nocapture = 11,
1359 nofree = 62,
1360 nest = 8,
1361 returned = 22,
1362 nonnull = 39,
1363 dereferenceable = 41,
1364 dereferenceable_or_null = 42,
1365 swiftself = 46,
1366 swiftasync = 75,
1367 swifterror = 47,
1368 immarg = 60,
1369 noundef = 68,
1370 nofpclass = 87,
1371 alignstack = 25,
1372 allocalign = 80,
1373 allocptr = 81,
1374 readnone = 20,
1375 readonly = 21,
1376 writeonly = 52,
1320 zeroext = @backingInt(ATTR_KIND.Z_EXT),
1321 signext = @backingInt(ATTR_KIND.S_EXT),
1322 noext = @backingInt(ATTR_KIND.NO_EXT),
1323 inreg = @backingInt(ATTR_KIND.IN_REG),
1324 byval = @backingInt(ATTR_KIND.BY_VAL),
1325 byref = @backingInt(ATTR_KIND.BYREF),
1326 preallocated = @backingInt(ATTR_KIND.PREALLOCATED),
1327 inalloca = @backingInt(ATTR_KIND.IN_ALLOCA),
1328 sret = @backingInt(ATTR_KIND.STRUCT_RET),
1329 elementtype = @backingInt(ATTR_KIND.ELEMENTTYPE),
1330 @"align" = @backingInt(ATTR_KIND.ALIGNMENT),
1331 @"noalias" = @backingInt(ATTR_KIND.NO_ALIAS),
1332 nocapture = @backingInt(ATTR_KIND.NO_CAPTURE),
1333 captures = @backingInt(ATTR_KIND.CAPTURES),
1334 nofree = @backingInt(ATTR_KIND.NOFREE),
1335 nest = @backingInt(ATTR_KIND.NEST),
1336 returned = @backingInt(ATTR_KIND.RETURNED),
1337 nonnull = @backingInt(ATTR_KIND.NON_NULL),
1338 dereferenceable = @backingInt(ATTR_KIND.DEREFERENCEABLE),
1339 dereferenceable_or_null = @backingInt(ATTR_KIND.DEREFERENCEABLE_OR_NULL),
1340 swiftself = @backingInt(ATTR_KIND.SWIFT_SELF),
1341 swiftasync = @backingInt(ATTR_KIND.SWIFT_ASYNC),
1342 swifterror = @backingInt(ATTR_KIND.SWIFT_ERROR),
1343 immarg = @backingInt(ATTR_KIND.IMMARG),
1344 noundef = @backingInt(ATTR_KIND.NOUNDEF),
1345 nofpclass = @backingInt(ATTR_KIND.NOFPCLASS),
1346 alignstack = @backingInt(ATTR_KIND.STACK_ALIGNMENT),
1347 allocalign = @backingInt(ATTR_KIND.ALLOC_ALIGN),
1348 allocptr = @backingInt(ATTR_KIND.ALLOCATED_POINTER),
1349 readnone = @backingInt(ATTR_KIND.READ_NONE),
1350 readonly = @backingInt(ATTR_KIND.READ_ONLY),
1351 writeonly = @backingInt(ATTR_KIND.WRITEONLY),
1352 writable = @backingInt(ATTR_KIND.WRITABLE),
1353 initializes = @backingInt(ATTR_KIND.INITIALIZES),
1354 dead_on_unwind = @backingInt(ATTR_KIND.DEAD_ON_UNWIND),
1355 dead_on_return = @backingInt(ATTR_KIND.DEAD_ON_RETURN),
1356 range = @backingInt(ATTR_KIND.RANGE),
13771357
13781358 // Function Attributes
1379 //alignstack,
1380 allockind = 82,
1381 allocsize = 51,
1382 alwaysinline = 2,
1383 builtin = 35,
1384 cold = 36,
1385 convergent = 43,
1386 disable_sanitizer_information = 78,
1387 fn_ret_thunk_extern = 84,
1388 hot = 72,
1389 inlinehint = 4,
1390 jumptable = 40,
1391 memory = 86,
1392 minsize = 6,
1393 naked = 7,
1394 nobuiltin = 10,
1395 nocallback = 71,
1396 noduplicate = 12,
1397 //nofree,
1398 noimplicitfloat = 13,
1399 @"noinline" = 14,
1400 nomerge = 66,
1401 nonlazybind = 15,
1402 noprofile = 73,
1403 skipprofile = 85,
1404 noredzone = 16,
1405 noreturn = 17,
1406 norecurse = 48,
1407 willreturn = 61,
1408 nosync = 63,
1409 nounwind = 18,
1410 nosanitize_bounds = 79,
1411 nosanitize_coverage = 76,
1412 null_pointer_is_valid = 67,
1413 optforfuzzing = 57,
1414 optnone = 37,
1415 optsize = 19,
1416 //preallocated,
1417 returns_twice = 23,
1418 safestack = 44,
1419 sanitize_address = 30,
1420 sanitize_memory = 32,
1421 sanitize_thread = 31,
1422 sanitize_hwaddress = 55,
1423 sanitize_memtag = 64,
1424 speculative_load_hardening = 59,
1425 speculatable = 53,
1426 ssp = 26,
1427 sspstrong = 28,
1428 sspreq = 27,
1429 strictfp = 54,
1430 uwtable = 33,
1431 nocf_check = 56,
1432 shadowcallstack = 58,
1433 mustprogress = 70,
1434 vscale_range = 74,
1435
1436 // Global Attributes
1437 no_sanitize_address = 100,
1438 no_sanitize_hwaddress = 101,
1439 //sanitize_memtag,
1440 sanitize_address_dyninit = 102,
1359 //alignstack = @intFromEnum(ATTR_KIND.STACK_ALIGNMENT),
1360 allockind = @backingInt(ATTR_KIND.ALLOC_KIND),
1361 allocsize = @backingInt(ATTR_KIND.ALLOC_SIZE),
1362 alwaysinline = @backingInt(ATTR_KIND.ALWAYS_INLINE),
1363 builtin = @backingInt(ATTR_KIND.BUILTIN),
1364 cold = @backingInt(ATTR_KIND.COLD),
1365 convergent = @backingInt(ATTR_KIND.CONVERGENT),
1366 disable_sanitizer_instrumentation = @backingInt(ATTR_KIND.DISABLE_SANITIZER_INSTRUMENTATION),
1367 fn_ret_thunk_extern = @backingInt(ATTR_KIND.FNRETTHUNK_EXTERN),
1368 hot = @backingInt(ATTR_KIND.HOT),
1369 inlinehint = @backingInt(ATTR_KIND.INLINE_HINT),
1370 jumptable = @backingInt(ATTR_KIND.JUMP_TABLE),
1371 memory = @backingInt(ATTR_KIND.MEMORY),
1372 minsize = @backingInt(ATTR_KIND.MIN_SIZE),
1373 naked = @backingInt(ATTR_KIND.NAKED),
1374 nobuiltin = @backingInt(ATTR_KIND.NO_BUILTIN),
1375 nocallback = @backingInt(ATTR_KIND.NO_CALLBACK),
1376 nodivergencesource = @backingInt(ATTR_KIND.NO_DIVERGENCE_SOURCE),
1377 noduplicate = @backingInt(ATTR_KIND.NO_DUPLICATE),
1378 //nofree = @intFromEnum(ATTR_KIND.NOFREE),
1379 noimplicitfloat = @backingInt(ATTR_KIND.NO_IMPLICIT_FLOAT),
1380 @"noinline" = @backingInt(ATTR_KIND.NO_INLINE),
1381 nomerge = @backingInt(ATTR_KIND.NO_MERGE),
1382 nonlazybind = @backingInt(ATTR_KIND.NON_LAZY_BIND),
1383 noprofile = @backingInt(ATTR_KIND.NO_PROFILE),
1384 skipprofile = @backingInt(ATTR_KIND.SKIP_PROFILE),
1385 noredzone = @backingInt(ATTR_KIND.NO_RED_ZONE),
1386 noreturn = @backingInt(ATTR_KIND.NO_RETURN),
1387 norecurse = @backingInt(ATTR_KIND.NO_RECURSE),
1388 willreturn = @backingInt(ATTR_KIND.WILLRETURN),
1389 nosync = @backingInt(ATTR_KIND.NOSYNC),
1390 nounwind = @backingInt(ATTR_KIND.NO_UNWIND),
1391 nosanitize_bounds = @backingInt(ATTR_KIND.NO_SANITIZE_BOUNDS),
1392 nosanitize_coverage = @backingInt(ATTR_KIND.NO_SANITIZE_COVERAGE),
1393 null_pointer_is_valid = @backingInt(ATTR_KIND.NULL_POINTER_IS_VALID),
1394 optdebug = @backingInt(ATTR_KIND.OPTIMIZE_FOR_DEBUGGING),
1395 optforfuzzing = @backingInt(ATTR_KIND.OPT_FOR_FUZZING),
1396 optnone = @backingInt(ATTR_KIND.OPTIMIZE_NONE),
1397 optsize = @backingInt(ATTR_KIND.OPTIMIZE_FOR_SIZE),
1398 //preallocated = @intFromEnum(ATTR_KIND.PREALLOCATED),
1399 returns_twice = @backingInt(ATTR_KIND.RETURNS_TWICE),
1400 safestack = @backingInt(ATTR_KIND.SAFESTACK),
1401 sanitize_address = @backingInt(ATTR_KIND.SANITIZE_ADDRESS),
1402 sanitize_memory = @backingInt(ATTR_KIND.SANITIZE_MEMORY),
1403 sanitize_thread = @backingInt(ATTR_KIND.SANITIZE_THREAD),
1404 sanitize_hwaddress = @backingInt(ATTR_KIND.SANITIZE_HWADDRESS),
1405 sanitize_memtag = @backingInt(ATTR_KIND.SANITIZE_MEMTAG),
1406 sanitize_realtime = @backingInt(ATTR_KIND.SANITIZE_REALTIME),
1407 sanitize_realtime_blocking = @backingInt(ATTR_KIND.SANITIZE_REALTIME_BLOCKING),
1408 sanitize_alloc_token = @backingInt(ATTR_KIND.SANITIZE_ALLOC_TOKEN),
1409 speculative_load_hardening = @backingInt(ATTR_KIND.SPECULATIVE_LOAD_HARDENING),
1410 speculatable = @backingInt(ATTR_KIND.SPECULATABLE),
1411 ssp = @backingInt(ATTR_KIND.STACK_PROTECT),
1412 sspstrong = @backingInt(ATTR_KIND.STACK_PROTECT_STRONG),
1413 sspreq = @backingInt(ATTR_KIND.STACK_PROTECT_REQ),
1414 strictfp = @backingInt(ATTR_KIND.STRICT_FP),
1415 denormal_fpenv = @backingInt(ATTR_KIND.DENORMAL_FPENV),
1416 uwtable = @backingInt(ATTR_KIND.UW_TABLE),
1417 nocf_check = @backingInt(ATTR_KIND.NOCF_CHECK),
1418 shadowcallstack = @backingInt(ATTR_KIND.SHADOWCALLSTACK),
1419 mustprogress = @backingInt(ATTR_KIND.MUSTPROGRESS),
1420 vscale_range = @backingInt(ATTR_KIND.VSCALE_RANGE),
1421 nooutline = @backingInt(ATTR_KIND.NOOUTLINE),
1422 nocreateundeforpoison = @backingInt(ATTR_KIND.NO_CREATE_UNDEF_OR_POISON),
14411423
14421424 string = maxInt(u31),
14431425 none = maxInt(u32),
......@@ -1447,16 +1429,128 @@ pub const Attribute = union(Kind) {
14471429
14481430 pub fn fromString(str: String) Kind {
14491431 assert(!str.isAnon());
1450 const kind: Kind = @fromBackingInt(@intCast(@backingInt(str)));
1432 const kind: Kind = @fromBackingInt(@backingInt(str));
14511433 assert(kind != .none);
14521434 return kind;
14531435 }
14541436
14551437 fn toString(self: Kind) ?String {
14561438 assert(self != .none);
1457 const str: String = @fromBackingInt(@intCast(@backingInt(self)));
1439 const str: String = @fromBackingInt(@backingInt(self));
14581440 return if (str.isAnon()) null else str;
14591441 }
1442
1443 /// enum AttributeKindCodes
1444 const ATTR_KIND = enum(u32) {
1445 ALIGNMENT = 1,
1446 ALWAYS_INLINE = 2,
1447 BY_VAL = 3,
1448 INLINE_HINT = 4,
1449 IN_REG = 5,
1450 MIN_SIZE = 6,
1451 NAKED = 7,
1452 NEST = 8,
1453 NO_ALIAS = 9,
1454 NO_BUILTIN = 10,
1455 NO_CAPTURE = 11,
1456 NO_DUPLICATE = 12,
1457 NO_IMPLICIT_FLOAT = 13,
1458 NO_INLINE = 14,
1459 NON_LAZY_BIND = 15,
1460 NO_RED_ZONE = 16,
1461 NO_RETURN = 17,
1462 NO_UNWIND = 18,
1463 OPTIMIZE_FOR_SIZE = 19,
1464 READ_NONE = 20,
1465 READ_ONLY = 21,
1466 RETURNED = 22,
1467 RETURNS_TWICE = 23,
1468 S_EXT = 24,
1469 STACK_ALIGNMENT = 25,
1470 STACK_PROTECT = 26,
1471 STACK_PROTECT_REQ = 27,
1472 STACK_PROTECT_STRONG = 28,
1473 STRUCT_RET = 29,
1474 SANITIZE_ADDRESS = 30,
1475 SANITIZE_THREAD = 31,
1476 SANITIZE_MEMORY = 32,
1477 UW_TABLE = 33,
1478 Z_EXT = 34,
1479 BUILTIN = 35,
1480 COLD = 36,
1481 OPTIMIZE_NONE = 37,
1482 IN_ALLOCA = 38,
1483 NON_NULL = 39,
1484 JUMP_TABLE = 40,
1485 DEREFERENCEABLE = 41,
1486 DEREFERENCEABLE_OR_NULL = 42,
1487 CONVERGENT = 43,
1488 SAFESTACK = 44,
1489 ARGMEMONLY = 45,
1490 SWIFT_SELF = 46,
1491 SWIFT_ERROR = 47,
1492 NO_RECURSE = 48,
1493 INACCESSIBLEMEM_ONLY = 49,
1494 INACCESSIBLEMEM_OR_ARGMEMONLY = 50,
1495 ALLOC_SIZE = 51,
1496 WRITEONLY = 52,
1497 SPECULATABLE = 53,
1498 STRICT_FP = 54,
1499 SANITIZE_HWADDRESS = 55,
1500 NOCF_CHECK = 56,
1501 OPT_FOR_FUZZING = 57,
1502 SHADOWCALLSTACK = 58,
1503 SPECULATIVE_LOAD_HARDENING = 59,
1504 IMMARG = 60,
1505 WILLRETURN = 61,
1506 NOFREE = 62,
1507 NOSYNC = 63,
1508 SANITIZE_MEMTAG = 64,
1509 PREALLOCATED = 65,
1510 NO_MERGE = 66,
1511 NULL_POINTER_IS_VALID = 67,
1512 NOUNDEF = 68,
1513 BYREF = 69,
1514 MUSTPROGRESS = 70,
1515 NO_CALLBACK = 71,
1516 HOT = 72,
1517 NO_PROFILE = 73,
1518 VSCALE_RANGE = 74,
1519 SWIFT_ASYNC = 75,
1520 NO_SANITIZE_COVERAGE = 76,
1521 ELEMENTTYPE = 77,
1522 DISABLE_SANITIZER_INSTRUMENTATION = 78,
1523 NO_SANITIZE_BOUNDS = 79,
1524 ALLOC_ALIGN = 80,
1525 ALLOCATED_POINTER = 81,
1526 ALLOC_KIND = 82,
1527 PRESPLIT_COROUTINE = 83,
1528 FNRETTHUNK_EXTERN = 84,
1529 SKIP_PROFILE = 85,
1530 MEMORY = 86,
1531 NOFPCLASS = 87,
1532 OPTIMIZE_FOR_DEBUGGING = 88,
1533 WRITABLE = 89,
1534 CORO_ONLY_DESTROY_WHEN_COMPLETE = 90,
1535 DEAD_ON_UNWIND = 91,
1536 RANGE = 92,
1537 SANITIZE_NUMERICAL_STABILITY = 93,
1538 INITIALIZES = 94,
1539 HYBRID_PATCHABLE = 95,
1540 SANITIZE_REALTIME = 96,
1541 SANITIZE_REALTIME_BLOCKING = 97,
1542 CORO_ELIDE_SAFE = 98,
1543 NO_EXT = 99,
1544 NO_DIVERGENCE_SOURCE = 100,
1545 SANITIZE_TYPE = 101,
1546 CAPTURES = 102,
1547 DEAD_ON_RETURN = 103,
1548 SANITIZE_ALLOC_TOKEN = 104,
1549 NO_CREATE_UNDEF_OR_POISON = 105,
1550 DENORMAL_FPENV = 106,
1551 NOOUTLINE = 107,
1552 FLATTEN = 108,
1553 };
14601554 };
14611555
14621556 pub const FpClass = packed struct(u32) {
......@@ -1506,6 +1600,29 @@ pub const Attribute = union(Kind) {
15061600 pub const pnorm = FpClass{ .positive_normal = true };
15071601 };
15081602
1603 pub const Captures = packed struct(u32) {
1604 other: Components = .none,
1605 ret: Components = .none,
1606 _: u24 = 0,
1607
1608 pub const none: Captures = .{};
1609
1610 pub const Components = packed struct(u4) {
1611 address_is_null: bool = false,
1612 address: bool = false,
1613 read_provenance: bool = false,
1614 provenance: bool = false,
1615
1616 pub const none: Components = .{};
1617 pub const all: Components = .{
1618 .address_is_null = true,
1619 .address = true,
1620 .read_provenance = true,
1621 .provenance = true,
1622 };
1623 };
1624 };
1625
15091626 pub const AllocKind = packed struct(u32) {
15101627 alloc: bool,
15111628 realloc: bool,
......@@ -1582,9 +1699,13 @@ pub const Attribute = union(Kind) {
15821699 void => 0,
15831700 u32 => value,
15841701 Alignment.Lazy, String, Type, UwTable => @backingInt(value),
1585 AllocKind, AllocSize, FpClass, Memory, VScaleRange => @bitCast(value),
1586 else => @compileError("bad payload type: " ++ @tagName(tag) ++ @typeName(@TypeOf(value))),
1702 AllocKind, AllocSize, Captures, FpClass, Memory, VScaleRange => @bitCast(value),
1703 else => @compileError("bad payload type: " ++ @tagName(tag) ++ ": " ++ @typeName(@TypeOf(value))),
15871704 } },
1705 .initializes,
1706 .dead_on_return,
1707 .range,
1708 => @panic("TODO"),
15881709 .string => |string_attr| .{
15891710 .kind = Kind.fromString(string_attr.kind),
15901711 .value = @backingInt(string_attr.value),
......@@ -1907,87 +2028,87 @@ pub const AddrSpace = enum(u24) {
19072028
19082029 // See llvm/lib/Target/X86/X86.h
19092030 pub const x86 = struct {
1910 pub const gs: AddrSpace = @fromBackingInt(@intCast(256));
1911 pub const fs: AddrSpace = @fromBackingInt(@intCast(257));
1912 pub const ss: AddrSpace = @fromBackingInt(@intCast(258));
2031 pub const gs: AddrSpace = @fromBackingInt(256);
2032 pub const fs: AddrSpace = @fromBackingInt(257);
2033 pub const ss: AddrSpace = @fromBackingInt(258);
19132034
1914 pub const ptr32_sptr: AddrSpace = @fromBackingInt(@intCast(270));
1915 pub const ptr32_uptr: AddrSpace = @fromBackingInt(@intCast(271));
1916 pub const ptr64: AddrSpace = @fromBackingInt(@intCast(272));
2035 pub const ptr32_sptr: AddrSpace = @fromBackingInt(270);
2036 pub const ptr32_uptr: AddrSpace = @fromBackingInt(271);
2037 pub const ptr64: AddrSpace = @fromBackingInt(272);
19172038 };
19182039 pub const x86_64 = x86;
19192040
19202041 // See llvm/lib/Target/AVR/AVR.h
19212042 pub const avr = struct {
1922 pub const data: AddrSpace = @fromBackingInt(@intCast(0));
1923 pub const program: AddrSpace = @fromBackingInt(@intCast(1));
1924 pub const program1: AddrSpace = @fromBackingInt(@intCast(2));
1925 pub const program2: AddrSpace = @fromBackingInt(@intCast(3));
1926 pub const program3: AddrSpace = @fromBackingInt(@intCast(4));
1927 pub const program4: AddrSpace = @fromBackingInt(@intCast(5));
1928 pub const program5: AddrSpace = @fromBackingInt(@intCast(6));
2043 pub const data: AddrSpace = @fromBackingInt(0);
2044 pub const program: AddrSpace = @fromBackingInt(1);
2045 pub const program1: AddrSpace = @fromBackingInt(2);
2046 pub const program2: AddrSpace = @fromBackingInt(3);
2047 pub const program3: AddrSpace = @fromBackingInt(4);
2048 pub const program4: AddrSpace = @fromBackingInt(5);
2049 pub const program5: AddrSpace = @fromBackingInt(6);
19292050 };
19302051
19312052 // See llvm/lib/Target/NVPTX/NVPTX.h
19322053 pub const nvptx = struct {
1933 pub const generic: AddrSpace = @fromBackingInt(@intCast(0));
1934 pub const global: AddrSpace = @fromBackingInt(@intCast(1));
1935 pub const constant: AddrSpace = @fromBackingInt(@intCast(2));
1936 pub const shared: AddrSpace = @fromBackingInt(@intCast(3));
1937 pub const param: AddrSpace = @fromBackingInt(@intCast(4));
1938 pub const local: AddrSpace = @fromBackingInt(@intCast(5));
2054 pub const generic: AddrSpace = @fromBackingInt(0);
2055 pub const global: AddrSpace = @fromBackingInt(1);
2056 pub const constant: AddrSpace = @fromBackingInt(2);
2057 pub const shared: AddrSpace = @fromBackingInt(3);
2058 pub const param: AddrSpace = @fromBackingInt(4);
2059 pub const local: AddrSpace = @fromBackingInt(5);
19392060 };
19402061
19412062 // See llvm/lib/Target/AMDGPU/AMDGPU.h
19422063 pub const amdgpu = struct {
1943 pub const flat: AddrSpace = @fromBackingInt(@intCast(0));
1944 pub const global: AddrSpace = @fromBackingInt(@intCast(1));
1945 pub const region: AddrSpace = @fromBackingInt(@intCast(2));
1946 pub const local: AddrSpace = @fromBackingInt(@intCast(3));
1947 pub const constant: AddrSpace = @fromBackingInt(@intCast(4));
1948 pub const private: AddrSpace = @fromBackingInt(@intCast(5));
1949 pub const constant_32bit: AddrSpace = @fromBackingInt(@intCast(6));
1950 pub const buffer_fat_pointer: AddrSpace = @fromBackingInt(@intCast(7));
1951 pub const buffer_resource: AddrSpace = @fromBackingInt(@intCast(8));
1952 pub const buffer_strided_pointer: AddrSpace = @fromBackingInt(@intCast(9));
1953 pub const param_d: AddrSpace = @fromBackingInt(@intCast(6));
1954 pub const param_i: AddrSpace = @fromBackingInt(@intCast(7));
1955 pub const constant_buffer_0: AddrSpace = @fromBackingInt(@intCast(8));
1956 pub const constant_buffer_1: AddrSpace = @fromBackingInt(@intCast(9));
1957 pub const constant_buffer_2: AddrSpace = @fromBackingInt(@intCast(10));
1958 pub const constant_buffer_3: AddrSpace = @fromBackingInt(@intCast(11));
1959 pub const constant_buffer_4: AddrSpace = @fromBackingInt(@intCast(12));
1960 pub const constant_buffer_5: AddrSpace = @fromBackingInt(@intCast(13));
1961 pub const constant_buffer_6: AddrSpace = @fromBackingInt(@intCast(14));
1962 pub const constant_buffer_7: AddrSpace = @fromBackingInt(@intCast(15));
1963 pub const constant_buffer_8: AddrSpace = @fromBackingInt(@intCast(16));
1964 pub const constant_buffer_9: AddrSpace = @fromBackingInt(@intCast(17));
1965 pub const constant_buffer_10: AddrSpace = @fromBackingInt(@intCast(18));
1966 pub const constant_buffer_11: AddrSpace = @fromBackingInt(@intCast(19));
1967 pub const constant_buffer_12: AddrSpace = @fromBackingInt(@intCast(20));
1968 pub const constant_buffer_13: AddrSpace = @fromBackingInt(@intCast(21));
1969 pub const constant_buffer_14: AddrSpace = @fromBackingInt(@intCast(22));
1970 pub const constant_buffer_15: AddrSpace = @fromBackingInt(@intCast(23));
1971 pub const streamout_register: AddrSpace = @fromBackingInt(@intCast(128));
2064 pub const flat: AddrSpace = @fromBackingInt(0);
2065 pub const global: AddrSpace = @fromBackingInt(1);
2066 pub const region: AddrSpace = @fromBackingInt(2);
2067 pub const local: AddrSpace = @fromBackingInt(3);
2068 pub const constant: AddrSpace = @fromBackingInt(4);
2069 pub const private: AddrSpace = @fromBackingInt(5);
2070 pub const constant_32bit: AddrSpace = @fromBackingInt(6);
2071 pub const buffer_fat_pointer: AddrSpace = @fromBackingInt(7);
2072 pub const buffer_resource: AddrSpace = @fromBackingInt(8);
2073 pub const buffer_strided_pointer: AddrSpace = @fromBackingInt(9);
2074 pub const param_d: AddrSpace = @fromBackingInt(6);
2075 pub const param_i: AddrSpace = @fromBackingInt(7);
2076 pub const constant_buffer_0: AddrSpace = @fromBackingInt(8);
2077 pub const constant_buffer_1: AddrSpace = @fromBackingInt(9);
2078 pub const constant_buffer_2: AddrSpace = @fromBackingInt(10);
2079 pub const constant_buffer_3: AddrSpace = @fromBackingInt(11);
2080 pub const constant_buffer_4: AddrSpace = @fromBackingInt(12);
2081 pub const constant_buffer_5: AddrSpace = @fromBackingInt(13);
2082 pub const constant_buffer_6: AddrSpace = @fromBackingInt(14);
2083 pub const constant_buffer_7: AddrSpace = @fromBackingInt(15);
2084 pub const constant_buffer_8: AddrSpace = @fromBackingInt(16);
2085 pub const constant_buffer_9: AddrSpace = @fromBackingInt(17);
2086 pub const constant_buffer_10: AddrSpace = @fromBackingInt(18);
2087 pub const constant_buffer_11: AddrSpace = @fromBackingInt(19);
2088 pub const constant_buffer_12: AddrSpace = @fromBackingInt(20);
2089 pub const constant_buffer_13: AddrSpace = @fromBackingInt(21);
2090 pub const constant_buffer_14: AddrSpace = @fromBackingInt(22);
2091 pub const constant_buffer_15: AddrSpace = @fromBackingInt(23);
2092 pub const streamout_register: AddrSpace = @fromBackingInt(128);
19722093 };
19732094
19742095 pub const spirv = struct {
1975 pub const function: AddrSpace = @fromBackingInt(@intCast(0));
1976 pub const cross_workgroup: AddrSpace = @fromBackingInt(@intCast(1));
1977 pub const uniform_constant: AddrSpace = @fromBackingInt(@intCast(2));
1978 pub const workgroup: AddrSpace = @fromBackingInt(@intCast(3));
1979 pub const generic: AddrSpace = @fromBackingInt(@intCast(4));
1980 pub const device_only_intel: AddrSpace = @fromBackingInt(@intCast(5));
1981 pub const host_only_intel: AddrSpace = @fromBackingInt(@intCast(6));
1982 pub const input: AddrSpace = @fromBackingInt(@intCast(7));
2096 pub const function: AddrSpace = @fromBackingInt(0);
2097 pub const cross_workgroup: AddrSpace = @fromBackingInt(1);
2098 pub const uniform_constant: AddrSpace = @fromBackingInt(2);
2099 pub const workgroup: AddrSpace = @fromBackingInt(3);
2100 pub const generic: AddrSpace = @fromBackingInt(4);
2101 pub const device_only_intel: AddrSpace = @fromBackingInt(5);
2102 pub const host_only_intel: AddrSpace = @fromBackingInt(6);
2103 pub const input: AddrSpace = @fromBackingInt(7);
19832104 };
19842105
19852106 // See llvm/include/llvm/CodeGen/WasmAddressSpaces.h
19862107 pub const wasm = struct {
1987 pub const default: AddrSpace = @fromBackingInt(@intCast(0));
1988 pub const variable: AddrSpace = @fromBackingInt(@intCast(1));
1989 pub const externref: AddrSpace = @fromBackingInt(@intCast(10));
1990 pub const funcref: AddrSpace = @fromBackingInt(@intCast(20));
2108 pub const default: AddrSpace = @fromBackingInt(0);
2109 pub const variable: AddrSpace = @fromBackingInt(1);
2110 pub const externref: AddrSpace = @fromBackingInt(10);
2111 pub const funcref: AddrSpace = @fromBackingInt(20);
19912112 };
19922113
19932114 pub fn format(addr_space: AddrSpace, w: *Writer) Writer.Error!void {
......@@ -2030,7 +2151,7 @@ pub const Alignment = enum(u6) {
20302151 _,
20312152
20322153 pub fn wrap(a: Alignment) Lazy {
2033 return @fromBackingInt(@intCast(@backingInt(a)));
2154 return @fromBackingInt(@backingInt(a));
20342155 }
20352156 pub fn resolve(l: Lazy, b: *const Builder) Alignment {
20362157 return switch (@backingInt(l)) {
......@@ -2261,8 +2382,7 @@ pub const StrtabString = enum(u32) {
22612382 }
22622383
22632384 fn fromIndex(index: ?usize) StrtabString {
2264 return @fromBackingInt(@intCast(@as(u32, @intCast((index orelse return .none) +
2265 @backingInt(StrtabString.empty)))));
2385 return @fromBackingInt(@intCast((index orelse return .none) + @backingInt(StrtabString.empty)));
22662386 }
22672387
22682388 fn toIndex(self: StrtabString) ?usize {
......@@ -2398,7 +2518,7 @@ pub const Global = struct {
23982518 }
23992519
24002520 pub fn toConst(global: Index) Constant {
2401 return @fromBackingInt(@intCast(@backingInt(Constant.first_global) + @backingInt(global)));
2521 return @fromBackingInt(@backingInt(Constant.first_global) + @backingInt(global));
24022522 }
24032523
24042524 pub fn toValue(global: Index) Value {
......@@ -2526,7 +2646,7 @@ pub const Global = struct {
25262646 _ = builder.addGlobalAssumeCapacity(new_name, builder.globals.values()[index]);
25272647 builder.globals.swapRemoveAt(index);
25282648 if (!old_name.isAnon()) return;
2529 builder.next_unnamed_global = @fromBackingInt(@intCast(@backingInt(builder.next_unnamed_global) - 1));
2649 builder.next_unnamed_global = @fromBackingInt(@backingInt(builder.next_unnamed_global) - 1);
25302650 if (builder.next_unnamed_global == old_name) return;
25312651 builder.getGlobal(builder.next_unnamed_global).?.renameAssumeCapacity(old_name, builder);
25322652 }
......@@ -2539,7 +2659,7 @@ pub const Global = struct {
25392659
25402660 fn replaceAssumeCapacity(self: Index, other: Index, builder: *Builder) void {
25412661 if (self.eql(other, builder)) return;
2542 builder.next_replaced_global = @fromBackingInt(@intCast(@backingInt(builder.next_replaced_global) - 1));
2662 builder.next_replaced_global = @fromBackingInt(@backingInt(builder.next_replaced_global) - 1);
25432663 self.renameAssumeCapacity(builder.next_replaced_global, builder);
25442664 self.ptr(builder).kind = .{ .replaced = other.unwrap(builder) };
25452665 }
......@@ -2699,6 +2819,8 @@ pub const Intrinsic = enum {
26992819 smin,
27002820 umax,
27012821 umin,
2822 scmp,
2823 ucmp,
27022824 memcpy,
27032825 @"memcpy.inline",
27042826 memmove,
......@@ -2708,10 +2830,21 @@ pub const Intrinsic = enum {
27082830 powi,
27092831 sin,
27102832 cos,
2833 tan,
2834 asin,
2835 acos,
2836 atan,
2837 atan2,
2838 sinh,
2839 cosh,
2840 tanh,
2841 sincos,
2842 sincospi,
2843 modf,
27112844 pow,
27122845 exp,
2713 exp10,
27142846 exp2,
2847 exp10,
27152848 ldexp,
27162849 frexp,
27172850 log,
......@@ -2723,6 +2856,8 @@ pub const Intrinsic = enum {
27232856 maxnum,
27242857 minimum,
27252858 maximum,
2859 minimumnum,
2860 maximumnum,
27262861 copysign,
27272862 floor,
27282863 ceil,
......@@ -2744,6 +2879,7 @@ pub const Intrinsic = enum {
27442879 cttz,
27452880 fshl,
27462881 fshr,
2882 clmul,
27472883
27482884 // Arithmetic with Overflow
27492885 @"sadd.with.overflow",
......@@ -2904,21 +3040,21 @@ pub const Intrinsic = enum {
29043040 .{ .kind = .{ .type = .ptr } },
29053041 .{ .kind = .{ .type = .i32 }, .attrs = &.{.immarg} },
29063042 },
2907 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3043 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = .all(.none) } },
29083044 },
29093045 .addressofreturnaddress = .{
29103046 .ret_len = 1,
29113047 .params = &.{
29123048 .{ .kind = .overloaded },
29133049 },
2914 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3050 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = .all(.none) } },
29153051 },
29163052 .sponentry = .{
29173053 .ret_len = 1,
29183054 .params = &.{
29193055 .{ .kind = .overloaded },
29203056 },
2921 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3057 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = .all(.none) } },
29223058 },
29233059 .frameaddress = .{
29243060 .ret_len = 1,
......@@ -2926,7 +3062,7 @@ pub const Intrinsic = enum {
29263062 .{ .kind = .overloaded },
29273063 .{ .kind = .{ .type = .i32 }, .attrs = &.{.immarg} },
29283064 },
2929 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3065 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = .all(.none) } },
29303066 },
29313067 .prefetch = .{
29323068 .ret_len = 0,
......@@ -2936,14 +3072,14 @@ pub const Intrinsic = enum {
29363072 .{ .kind = .{ .type = .i32 }, .attrs = &.{.immarg} },
29373073 .{ .kind = .{ .type = .i32 }, .attrs = &.{.immarg} },
29383074 },
2939 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.readwrite) } },
3075 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = .all(.readwrite) } },
29403076 },
29413077 .@"thread.pointer" = .{
29423078 .ret_len = 1,
29433079 .params = &.{
29443080 .{ .kind = .{ .type = .ptr } },
29453081 },
2946 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3082 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = .all(.none) } },
29473083 },
29483084
29493085 .abs = .{
......@@ -2953,7 +3089,7 @@ pub const Intrinsic = enum {
29533089 .{ .kind = .{ .matches = 0 } },
29543090 .{ .kind = .{ .type = .i1 }, .attrs = &.{.immarg} },
29553091 },
2956 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3092 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
29573093 },
29583094 .smax = .{
29593095 .ret_len = 1,
......@@ -2962,7 +3098,7 @@ pub const Intrinsic = enum {
29623098 .{ .kind = .{ .matches = 0 } },
29633099 .{ .kind = .{ .matches = 0 } },
29643100 },
2965 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3101 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
29663102 },
29673103 .smin = .{
29683104 .ret_len = 1,
......@@ -2971,7 +3107,7 @@ pub const Intrinsic = enum {
29713107 .{ .kind = .{ .matches = 0 } },
29723108 .{ .kind = .{ .matches = 0 } },
29733109 },
2974 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3110 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
29753111 },
29763112 .umax = .{
29773113 .ret_len = 1,
......@@ -2980,7 +3116,7 @@ pub const Intrinsic = enum {
29803116 .{ .kind = .{ .matches = 0 } },
29813117 .{ .kind = .{ .matches = 0 } },
29823118 },
2983 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3119 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
29843120 },
29853121 .umin = .{
29863122 .ret_len = 1,
......@@ -2989,7 +3125,25 @@ pub const Intrinsic = enum {
29893125 .{ .kind = .{ .matches = 0 } },
29903126 .{ .kind = .{ .matches = 0 } },
29913127 },
2992 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3128 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
3129 },
3130 .scmp = .{
3131 .ret_len = 1,
3132 .params = &.{
3133 .{ .kind = .overloaded },
3134 .{ .kind = .overloaded },
3135 .{ .kind = .{ .matches = 1 } },
3136 },
3137 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
3138 },
3139 .ucmp = .{
3140 .ret_len = 1,
3141 .params = &.{
3142 .{ .kind = .overloaded },
3143 .{ .kind = .overloaded },
3144 .{ .kind = .{ .matches = 1 } },
3145 },
3146 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
29933147 },
29943148 .memcpy = .{
29953149 .ret_len = 0,
......@@ -3047,7 +3201,7 @@ pub const Intrinsic = enum {
30473201 .{ .kind = .overloaded },
30483202 .{ .kind = .{ .matches = 0 } },
30493203 },
3050 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3204 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
30513205 },
30523206 .powi = .{
30533207 .ret_len = 1,
......@@ -3056,7 +3210,7 @@ pub const Intrinsic = enum {
30563210 .{ .kind = .{ .matches = 0 } },
30573211 .{ .kind = .overloaded },
30583212 },
3059 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3213 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
30603214 },
30613215 .sin = .{
30623216 .ret_len = 1,
......@@ -3064,7 +3218,7 @@ pub const Intrinsic = enum {
30643218 .{ .kind = .overloaded },
30653219 .{ .kind = .{ .matches = 0 } },
30663220 },
3067 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3221 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
30683222 },
30693223 .cos = .{
30703224 .ret_len = 1,
......@@ -3072,7 +3226,99 @@ pub const Intrinsic = enum {
30723226 .{ .kind = .overloaded },
30733227 .{ .kind = .{ .matches = 0 } },
30743228 },
3075 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3229 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
3230 },
3231 .tan = .{
3232 .ret_len = 1,
3233 .params = &.{
3234 .{ .kind = .overloaded },
3235 .{ .kind = .{ .matches = 0 } },
3236 },
3237 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
3238 },
3239 .asin = .{
3240 .ret_len = 1,
3241 .params = &.{
3242 .{ .kind = .overloaded },
3243 .{ .kind = .{ .matches = 0 } },
3244 },
3245 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
3246 },
3247 .acos = .{
3248 .ret_len = 1,
3249 .params = &.{
3250 .{ .kind = .overloaded },
3251 .{ .kind = .{ .matches = 0 } },
3252 },
3253 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
3254 },
3255 .atan = .{
3256 .ret_len = 1,
3257 .params = &.{
3258 .{ .kind = .overloaded },
3259 .{ .kind = .{ .matches = 0 } },
3260 },
3261 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
3262 },
3263 .atan2 = .{
3264 .ret_len = 1,
3265 .params = &.{
3266 .{ .kind = .overloaded },
3267 .{ .kind = .{ .matches = 0 } },
3268 .{ .kind = .{ .matches = 0 } },
3269 },
3270 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
3271 },
3272 .sinh = .{
3273 .ret_len = 1,
3274 .params = &.{
3275 .{ .kind = .overloaded },
3276 .{ .kind = .{ .matches = 0 } },
3277 },
3278 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
3279 },
3280 .cosh = .{
3281 .ret_len = 1,
3282 .params = &.{
3283 .{ .kind = .overloaded },
3284 .{ .kind = .{ .matches = 0 } },
3285 },
3286 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
3287 },
3288 .tanh = .{
3289 .ret_len = 1,
3290 .params = &.{
3291 .{ .kind = .overloaded },
3292 .{ .kind = .{ .matches = 0 } },
3293 },
3294 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
3295 },
3296 .sincos = .{
3297 .ret_len = 2,
3298 .params = &.{
3299 .{ .kind = .overloaded },
3300 .{ .kind = .{ .matches = 0 } },
3301 .{ .kind = .{ .matches = 0 } },
3302 },
3303 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
3304 },
3305 .sincospi = .{
3306 .ret_len = 2,
3307 .params = &.{
3308 .{ .kind = .overloaded },
3309 .{ .kind = .{ .matches = 0 } },
3310 .{ .kind = .{ .matches = 0 } },
3311 },
3312 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
3313 },
3314 .modf = .{
3315 .ret_len = 2,
3316 .params = &.{
3317 .{ .kind = .overloaded },
3318 .{ .kind = .{ .matches = 0 } },
3319 .{ .kind = .{ .matches = 0 } },
3320 },
3321 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
30763322 },
30773323 .pow = .{
30783324 .ret_len = 1,
......@@ -3081,7 +3327,7 @@ pub const Intrinsic = enum {
30813327 .{ .kind = .{ .matches = 0 } },
30823328 .{ .kind = .{ .matches = 0 } },
30833329 },
3084 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3330 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
30853331 },
30863332 .exp = .{
30873333 .ret_len = 1,
......@@ -3089,7 +3335,7 @@ pub const Intrinsic = enum {
30893335 .{ .kind = .overloaded },
30903336 .{ .kind = .{ .matches = 0 } },
30913337 },
3092 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3338 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
30933339 },
30943340 .exp2 = .{
30953341 .ret_len = 1,
......@@ -3097,7 +3343,7 @@ pub const Intrinsic = enum {
30973343 .{ .kind = .overloaded },
30983344 .{ .kind = .{ .matches = 0 } },
30993345 },
3100 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3346 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
31013347 },
31023348 .exp10 = .{
31033349 .ret_len = 1,
......@@ -3105,7 +3351,7 @@ pub const Intrinsic = enum {
31053351 .{ .kind = .overloaded },
31063352 .{ .kind = .{ .matches = 0 } },
31073353 },
3108 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3354 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
31093355 },
31103356 .ldexp = .{
31113357 .ret_len = 1,
......@@ -3114,7 +3360,7 @@ pub const Intrinsic = enum {
31143360 .{ .kind = .{ .matches = 0 } },
31153361 .{ .kind = .overloaded },
31163362 },
3117 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3363 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
31183364 },
31193365 .frexp = .{
31203366 .ret_len = 2,
......@@ -3123,7 +3369,7 @@ pub const Intrinsic = enum {
31233369 .{ .kind = .overloaded },
31243370 .{ .kind = .{ .matches = 0 } },
31253371 },
3126 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3372 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
31273373 },
31283374 .log = .{
31293375 .ret_len = 1,
......@@ -3131,7 +3377,7 @@ pub const Intrinsic = enum {
31313377 .{ .kind = .overloaded },
31323378 .{ .kind = .{ .matches = 0 } },
31333379 },
3134 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3380 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
31353381 },
31363382 .log10 = .{
31373383 .ret_len = 1,
......@@ -3139,7 +3385,7 @@ pub const Intrinsic = enum {
31393385 .{ .kind = .overloaded },
31403386 .{ .kind = .{ .matches = 0 } },
31413387 },
3142 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3388 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
31433389 },
31443390 .log2 = .{
31453391 .ret_len = 1,
......@@ -3147,7 +3393,7 @@ pub const Intrinsic = enum {
31473393 .{ .kind = .overloaded },
31483394 .{ .kind = .{ .matches = 0 } },
31493395 },
3150 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3396 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
31513397 },
31523398 .fma = .{
31533399 .ret_len = 1,
......@@ -3157,7 +3403,7 @@ pub const Intrinsic = enum {
31573403 .{ .kind = .{ .matches = 0 } },
31583404 .{ .kind = .{ .matches = 0 } },
31593405 },
3160 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3406 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
31613407 },
31623408 .fabs = .{
31633409 .ret_len = 1,
......@@ -3165,7 +3411,7 @@ pub const Intrinsic = enum {
31653411 .{ .kind = .overloaded },
31663412 .{ .kind = .{ .matches = 0 } },
31673413 },
3168 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3414 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
31693415 },
31703416 .minnum = .{
31713417 .ret_len = 1,
......@@ -3174,7 +3420,7 @@ pub const Intrinsic = enum {
31743420 .{ .kind = .{ .matches = 0 } },
31753421 .{ .kind = .{ .matches = 0 } },
31763422 },
3177 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3423 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
31783424 },
31793425 .maxnum = .{
31803426 .ret_len = 1,
......@@ -3183,7 +3429,7 @@ pub const Intrinsic = enum {
31833429 .{ .kind = .{ .matches = 0 } },
31843430 .{ .kind = .{ .matches = 0 } },
31853431 },
3186 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3432 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
31873433 },
31883434 .minimum = .{
31893435 .ret_len = 1,
......@@ -3192,7 +3438,7 @@ pub const Intrinsic = enum {
31923438 .{ .kind = .{ .matches = 0 } },
31933439 .{ .kind = .{ .matches = 0 } },
31943440 },
3195 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3441 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
31963442 },
31973443 .maximum = .{
31983444 .ret_len = 1,
......@@ -3201,7 +3447,25 @@ pub const Intrinsic = enum {
32013447 .{ .kind = .{ .matches = 0 } },
32023448 .{ .kind = .{ .matches = 0 } },
32033449 },
3204 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3450 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
3451 },
3452 .minimumnum = .{
3453 .ret_len = 1,
3454 .params = &.{
3455 .{ .kind = .overloaded },
3456 .{ .kind = .{ .matches = 0 } },
3457 .{ .kind = .{ .matches = 0 } },
3458 },
3459 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
3460 },
3461 .maximumnum = .{
3462 .ret_len = 1,
3463 .params = &.{
3464 .{ .kind = .overloaded },
3465 .{ .kind = .{ .matches = 0 } },
3466 .{ .kind = .{ .matches = 0 } },
3467 },
3468 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
32053469 },
32063470 .copysign = .{
32073471 .ret_len = 1,
......@@ -3210,7 +3474,7 @@ pub const Intrinsic = enum {
32103474 .{ .kind = .{ .matches = 0 } },
32113475 .{ .kind = .{ .matches = 0 } },
32123476 },
3213 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3477 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
32143478 },
32153479 .floor = .{
32163480 .ret_len = 1,
......@@ -3218,7 +3482,7 @@ pub const Intrinsic = enum {
32183482 .{ .kind = .overloaded },
32193483 .{ .kind = .{ .matches = 0 } },
32203484 },
3221 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3485 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
32223486 },
32233487 .ceil = .{
32243488 .ret_len = 1,
......@@ -3226,7 +3490,7 @@ pub const Intrinsic = enum {
32263490 .{ .kind = .overloaded },
32273491 .{ .kind = .{ .matches = 0 } },
32283492 },
3229 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3493 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
32303494 },
32313495 .trunc = .{
32323496 .ret_len = 1,
......@@ -3234,7 +3498,7 @@ pub const Intrinsic = enum {
32343498 .{ .kind = .overloaded },
32353499 .{ .kind = .{ .matches = 0 } },
32363500 },
3237 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3501 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
32383502 },
32393503 .rint = .{
32403504 .ret_len = 1,
......@@ -3242,7 +3506,7 @@ pub const Intrinsic = enum {
32423506 .{ .kind = .overloaded },
32433507 .{ .kind = .{ .matches = 0 } },
32443508 },
3245 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3509 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
32463510 },
32473511 .nearbyint = .{
32483512 .ret_len = 1,
......@@ -3250,7 +3514,7 @@ pub const Intrinsic = enum {
32503514 .{ .kind = .overloaded },
32513515 .{ .kind = .{ .matches = 0 } },
32523516 },
3253 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3517 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
32543518 },
32553519 .round = .{
32563520 .ret_len = 1,
......@@ -3258,7 +3522,7 @@ pub const Intrinsic = enum {
32583522 .{ .kind = .overloaded },
32593523 .{ .kind = .{ .matches = 0 } },
32603524 },
3261 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3525 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
32623526 },
32633527 .roundeven = .{
32643528 .ret_len = 1,
......@@ -3266,7 +3530,7 @@ pub const Intrinsic = enum {
32663530 .{ .kind = .overloaded },
32673531 .{ .kind = .{ .matches = 0 } },
32683532 },
3269 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3533 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
32703534 },
32713535 .lround = .{
32723536 .ret_len = 1,
......@@ -3274,7 +3538,7 @@ pub const Intrinsic = enum {
32743538 .{ .kind = .overloaded },
32753539 .{ .kind = .overloaded },
32763540 },
3277 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3541 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
32783542 },
32793543 .llround = .{
32803544 .ret_len = 1,
......@@ -3282,7 +3546,7 @@ pub const Intrinsic = enum {
32823546 .{ .kind = .overloaded },
32833547 .{ .kind = .overloaded },
32843548 },
3285 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3549 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
32863550 },
32873551 .lrint = .{
32883552 .ret_len = 1,
......@@ -3290,7 +3554,7 @@ pub const Intrinsic = enum {
32903554 .{ .kind = .overloaded },
32913555 .{ .kind = .overloaded },
32923556 },
3293 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3557 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
32943558 },
32953559 .llrint = .{
32963560 .ret_len = 1,
......@@ -3298,7 +3562,7 @@ pub const Intrinsic = enum {
32983562 .{ .kind = .overloaded },
32993563 .{ .kind = .overloaded },
33003564 },
3301 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3565 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
33023566 },
33033567
33043568 .bitreverse = .{
......@@ -3307,7 +3571,7 @@ pub const Intrinsic = enum {
33073571 .{ .kind = .overloaded },
33083572 .{ .kind = .{ .matches = 0 } },
33093573 },
3310 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3574 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
33113575 },
33123576 .bswap = .{
33133577 .ret_len = 1,
......@@ -3315,7 +3579,7 @@ pub const Intrinsic = enum {
33153579 .{ .kind = .overloaded },
33163580 .{ .kind = .{ .matches = 0 } },
33173581 },
3318 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3582 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
33193583 },
33203584 .ctpop = .{
33213585 .ret_len = 1,
......@@ -3323,7 +3587,7 @@ pub const Intrinsic = enum {
33233587 .{ .kind = .overloaded },
33243588 .{ .kind = .{ .matches = 0 } },
33253589 },
3326 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3590 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
33273591 },
33283592 .ctlz = .{
33293593 .ret_len = 1,
......@@ -3332,7 +3596,7 @@ pub const Intrinsic = enum {
33323596 .{ .kind = .{ .matches = 0 } },
33333597 .{ .kind = .{ .type = .i1 }, .attrs = &.{.immarg} },
33343598 },
3335 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3599 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
33363600 },
33373601 .cttz = .{
33383602 .ret_len = 1,
......@@ -3341,7 +3605,7 @@ pub const Intrinsic = enum {
33413605 .{ .kind = .{ .matches = 0 } },
33423606 .{ .kind = .{ .type = .i1 }, .attrs = &.{.immarg} },
33433607 },
3344 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3608 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
33453609 },
33463610 .fshl = .{
33473611 .ret_len = 1,
......@@ -3351,7 +3615,7 @@ pub const Intrinsic = enum {
33513615 .{ .kind = .{ .matches = 0 } },
33523616 .{ .kind = .{ .matches = 0 } },
33533617 },
3354 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3618 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
33553619 },
33563620 .fshr = .{
33573621 .ret_len = 1,
......@@ -3361,7 +3625,16 @@ pub const Intrinsic = enum {
33613625 .{ .kind = .{ .matches = 0 } },
33623626 .{ .kind = .{ .matches = 0 } },
33633627 },
3364 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3628 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
3629 },
3630 .clmul = .{
3631 .ret_len = 1,
3632 .params = &.{
3633 .{ .kind = .overloaded },
3634 .{ .kind = .{ .matches = 0 } },
3635 .{ .kind = .{ .matches = 0 } },
3636 },
3637 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
33653638 },
33663639
33673640 .@"sadd.with.overflow" = .{
......@@ -3372,7 +3645,7 @@ pub const Intrinsic = enum {
33723645 .{ .kind = .{ .matches = 0 } },
33733646 .{ .kind = .{ .matches = 0 } },
33743647 },
3375 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3648 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
33763649 },
33773650 .@"uadd.with.overflow" = .{
33783651 .ret_len = 2,
......@@ -3382,7 +3655,7 @@ pub const Intrinsic = enum {
33823655 .{ .kind = .{ .matches = 0 } },
33833656 .{ .kind = .{ .matches = 0 } },
33843657 },
3385 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3658 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
33863659 },
33873660 .@"ssub.with.overflow" = .{
33883661 .ret_len = 2,
......@@ -3392,7 +3665,7 @@ pub const Intrinsic = enum {
33923665 .{ .kind = .{ .matches = 0 } },
33933666 .{ .kind = .{ .matches = 0 } },
33943667 },
3395 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3668 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
33963669 },
33973670 .@"usub.with.overflow" = .{
33983671 .ret_len = 2,
......@@ -3402,7 +3675,7 @@ pub const Intrinsic = enum {
34023675 .{ .kind = .{ .matches = 0 } },
34033676 .{ .kind = .{ .matches = 0 } },
34043677 },
3405 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3678 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
34063679 },
34073680 .@"smul.with.overflow" = .{
34083681 .ret_len = 2,
......@@ -3412,7 +3685,7 @@ pub const Intrinsic = enum {
34123685 .{ .kind = .{ .matches = 0 } },
34133686 .{ .kind = .{ .matches = 0 } },
34143687 },
3415 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3688 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
34163689 },
34173690 .@"umul.with.overflow" = .{
34183691 .ret_len = 2,
......@@ -3422,7 +3695,7 @@ pub const Intrinsic = enum {
34223695 .{ .kind = .{ .matches = 0 } },
34233696 .{ .kind = .{ .matches = 0 } },
34243697 },
3425 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3698 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
34263699 },
34273700
34283701 .@"sadd.sat" = .{
......@@ -3432,7 +3705,7 @@ pub const Intrinsic = enum {
34323705 .{ .kind = .{ .matches = 0 } },
34333706 .{ .kind = .{ .matches = 0 } },
34343707 },
3435 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3708 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
34363709 },
34373710 .@"uadd.sat" = .{
34383711 .ret_len = 1,
......@@ -3441,7 +3714,7 @@ pub const Intrinsic = enum {
34413714 .{ .kind = .{ .matches = 0 } },
34423715 .{ .kind = .{ .matches = 0 } },
34433716 },
3444 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3717 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
34453718 },
34463719 .@"ssub.sat" = .{
34473720 .ret_len = 1,
......@@ -3450,7 +3723,7 @@ pub const Intrinsic = enum {
34503723 .{ .kind = .{ .matches = 0 } },
34513724 .{ .kind = .{ .matches = 0 } },
34523725 },
3453 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3726 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
34543727 },
34553728 .@"usub.sat" = .{
34563729 .ret_len = 1,
......@@ -3459,7 +3732,7 @@ pub const Intrinsic = enum {
34593732 .{ .kind = .{ .matches = 0 } },
34603733 .{ .kind = .{ .matches = 0 } },
34613734 },
3462 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3735 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
34633736 },
34643737 .@"sshl.sat" = .{
34653738 .ret_len = 1,
......@@ -3468,7 +3741,7 @@ pub const Intrinsic = enum {
34683741 .{ .kind = .{ .matches = 0 } },
34693742 .{ .kind = .{ .matches = 0 } },
34703743 },
3471 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3744 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
34723745 },
34733746 .@"ushl.sat" = .{
34743747 .ret_len = 1,
......@@ -3477,7 +3750,7 @@ pub const Intrinsic = enum {
34773750 .{ .kind = .{ .matches = 0 } },
34783751 .{ .kind = .{ .matches = 0 } },
34793752 },
3480 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3753 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
34813754 },
34823755
34833756 .@"smul.fix" = .{
......@@ -3488,7 +3761,7 @@ pub const Intrinsic = enum {
34883761 .{ .kind = .{ .matches = 0 } },
34893762 .{ .kind = .{ .type = .i32 }, .attrs = &.{.immarg} },
34903763 },
3491 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3764 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
34923765 },
34933766 .@"umul.fix" = .{
34943767 .ret_len = 1,
......@@ -3498,7 +3771,7 @@ pub const Intrinsic = enum {
34983771 .{ .kind = .{ .matches = 0 } },
34993772 .{ .kind = .{ .type = .i32 }, .attrs = &.{.immarg} },
35003773 },
3501 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3774 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
35023775 },
35033776 .@"smul.fix.sat" = .{
35043777 .ret_len = 1,
......@@ -3508,7 +3781,7 @@ pub const Intrinsic = enum {
35083781 .{ .kind = .{ .matches = 0 } },
35093782 .{ .kind = .{ .type = .i32 }, .attrs = &.{.immarg} },
35103783 },
3511 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3784 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
35123785 },
35133786 .@"umul.fix.sat" = .{
35143787 .ret_len = 1,
......@@ -3518,7 +3791,7 @@ pub const Intrinsic = enum {
35183791 .{ .kind = .{ .matches = 0 } },
35193792 .{ .kind = .{ .type = .i32 }, .attrs = &.{.immarg} },
35203793 },
3521 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3794 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
35223795 },
35233796 .@"sdiv.fix" = .{
35243797 .ret_len = 1,
......@@ -3528,7 +3801,7 @@ pub const Intrinsic = enum {
35283801 .{ .kind = .{ .matches = 0 } },
35293802 .{ .kind = .{ .type = .i32 }, .attrs = &.{.immarg} },
35303803 },
3531 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3804 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = .all(.none) } },
35323805 },
35333806 .@"udiv.fix" = .{
35343807 .ret_len = 1,
......@@ -3538,7 +3811,7 @@ pub const Intrinsic = enum {
35383811 .{ .kind = .{ .matches = 0 } },
35393812 .{ .kind = .{ .type = .i32 }, .attrs = &.{.immarg} },
35403813 },
3541 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3814 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = .all(.none) } },
35423815 },
35433816 .@"sdiv.fix.sat" = .{
35443817 .ret_len = 1,
......@@ -3548,7 +3821,7 @@ pub const Intrinsic = enum {
35483821 .{ .kind = .{ .matches = 0 } },
35493822 .{ .kind = .{ .type = .i32 }, .attrs = &.{.immarg} },
35503823 },
3551 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3824 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = .all(.none) } },
35523825 },
35533826 .@"udiv.fix.sat" = .{
35543827 .ret_len = 1,
......@@ -3558,7 +3831,7 @@ pub const Intrinsic = enum {
35583831 .{ .kind = .{ .matches = 0 } },
35593832 .{ .kind = .{ .type = .i32 }, .attrs = &.{.immarg} },
35603833 },
3561 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3834 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = .all(.none) } },
35623835 },
35633836
35643837 .canonicalize = .{
......@@ -3567,7 +3840,7 @@ pub const Intrinsic = enum {
35673840 .{ .kind = .overloaded },
35683841 .{ .kind = .{ .matches = 0 } },
35693842 },
3570 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3843 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
35713844 },
35723845 .fmuladd = .{
35733846 .ret_len = 1,
......@@ -3577,7 +3850,7 @@ pub const Intrinsic = enum {
35773850 .{ .kind = .{ .matches = 0 } },
35783851 .{ .kind = .{ .matches = 0 } },
35793852 },
3580 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3853 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
35813854 },
35823855
35833856 .@"vector.reduce.add" = .{
......@@ -3586,7 +3859,7 @@ pub const Intrinsic = enum {
35863859 .{ .kind = .{ .matches_scalar = 1 } },
35873860 .{ .kind = .overloaded },
35883861 },
3589 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3862 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
35903863 },
35913864 .@"vector.reduce.fadd" = .{
35923865 .ret_len = 1,
......@@ -3595,7 +3868,7 @@ pub const Intrinsic = enum {
35953868 .{ .kind = .{ .matches_scalar = 2 } },
35963869 .{ .kind = .overloaded },
35973870 },
3598 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3871 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
35993872 },
36003873 .@"vector.reduce.mul" = .{
36013874 .ret_len = 1,
......@@ -3603,7 +3876,7 @@ pub const Intrinsic = enum {
36033876 .{ .kind = .{ .matches_scalar = 1 } },
36043877 .{ .kind = .overloaded },
36053878 },
3606 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3879 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
36073880 },
36083881 .@"vector.reduce.fmul" = .{
36093882 .ret_len = 1,
......@@ -3612,7 +3885,7 @@ pub const Intrinsic = enum {
36123885 .{ .kind = .{ .matches_scalar = 2 } },
36133886 .{ .kind = .overloaded },
36143887 },
3615 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3888 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
36163889 },
36173890 .@"vector.reduce.and" = .{
36183891 .ret_len = 1,
......@@ -3620,7 +3893,7 @@ pub const Intrinsic = enum {
36203893 .{ .kind = .{ .matches_scalar = 1 } },
36213894 .{ .kind = .overloaded },
36223895 },
3623 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3896 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
36243897 },
36253898 .@"vector.reduce.or" = .{
36263899 .ret_len = 1,
......@@ -3628,7 +3901,7 @@ pub const Intrinsic = enum {
36283901 .{ .kind = .{ .matches_scalar = 1 } },
36293902 .{ .kind = .overloaded },
36303903 },
3631 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3904 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
36323905 },
36333906 .@"vector.reduce.xor" = .{
36343907 .ret_len = 1,
......@@ -3636,7 +3909,7 @@ pub const Intrinsic = enum {
36363909 .{ .kind = .{ .matches_scalar = 1 } },
36373910 .{ .kind = .overloaded },
36383911 },
3639 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3912 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
36403913 },
36413914 .@"vector.reduce.smax" = .{
36423915 .ret_len = 1,
......@@ -3644,7 +3917,7 @@ pub const Intrinsic = enum {
36443917 .{ .kind = .{ .matches_scalar = 1 } },
36453918 .{ .kind = .overloaded },
36463919 },
3647 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3920 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
36483921 },
36493922 .@"vector.reduce.smin" = .{
36503923 .ret_len = 1,
......@@ -3652,7 +3925,7 @@ pub const Intrinsic = enum {
36523925 .{ .kind = .{ .matches_scalar = 1 } },
36533926 .{ .kind = .overloaded },
36543927 },
3655 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3928 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
36563929 },
36573930 .@"vector.reduce.umax" = .{
36583931 .ret_len = 1,
......@@ -3660,7 +3933,7 @@ pub const Intrinsic = enum {
36603933 .{ .kind = .{ .matches_scalar = 1 } },
36613934 .{ .kind = .overloaded },
36623935 },
3663 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3936 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
36643937 },
36653938 .@"vector.reduce.umin" = .{
36663939 .ret_len = 1,
......@@ -3668,7 +3941,7 @@ pub const Intrinsic = enum {
36683941 .{ .kind = .{ .matches_scalar = 1 } },
36693942 .{ .kind = .overloaded },
36703943 },
3671 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3944 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
36723945 },
36733946 .@"vector.reduce.fmax" = .{
36743947 .ret_len = 1,
......@@ -3676,7 +3949,7 @@ pub const Intrinsic = enum {
36763949 .{ .kind = .{ .matches_scalar = 1 } },
36773950 .{ .kind = .overloaded },
36783951 },
3679 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3952 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
36803953 },
36813954 .@"vector.reduce.fmin" = .{
36823955 .ret_len = 1,
......@@ -3684,7 +3957,7 @@ pub const Intrinsic = enum {
36843957 .{ .kind = .{ .matches_scalar = 1 } },
36853958 .{ .kind = .overloaded },
36863959 },
3687 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3960 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
36883961 },
36893962 .@"vector.reduce.fmaximum" = .{
36903963 .ret_len = 1,
......@@ -3692,7 +3965,7 @@ pub const Intrinsic = enum {
36923965 .{ .kind = .{ .matches_scalar = 1 } },
36933966 .{ .kind = .overloaded },
36943967 },
3695 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3968 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
36963969 },
36973970 .@"vector.reduce.fminimum" = .{
36983971 .ret_len = 1,
......@@ -3700,7 +3973,7 @@ pub const Intrinsic = enum {
37003973 .{ .kind = .{ .matches_scalar = 1 } },
37013974 .{ .kind = .overloaded },
37023975 },
3703 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3976 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
37043977 },
37053978 .@"vector.insert" = .{
37063979 .ret_len = 1,
......@@ -3710,7 +3983,7 @@ pub const Intrinsic = enum {
37103983 .{ .kind = .overloaded },
37113984 .{ .kind = .{ .type = .i64 } },
37123985 },
3713 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3986 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
37143987 },
37153988 .@"vector.extract" = .{
37163989 .ret_len = 1,
......@@ -3719,7 +3992,7 @@ pub const Intrinsic = enum {
37193992 .{ .kind = .overloaded },
37203993 .{ .kind = .{ .type = .i64 } },
37213994 },
3722 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3995 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
37233996 },
37243997
37253998 .@"is.fpclass" = .{
......@@ -3729,7 +4002,7 @@ pub const Intrinsic = enum {
37294002 .{ .kind = .overloaded },
37304003 .{ .kind = .{ .type = .i32 }, .attrs = &.{.immarg} },
37314004 },
3732 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4005 .attrs = &.{ .nocallback, .nocreateundeforpoison, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
37334006 },
37344007
37354008 .@"var.annotation" = .{
......@@ -3814,7 +4087,7 @@ pub const Intrinsic = enum {
38144087 .{ .kind = .{ .type = .i1 }, .attrs = &.{.immarg} },
38154088 .{ .kind = .{ .type = .i1 }, .attrs = &.{.immarg} },
38164089 },
3817 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4090 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
38184091 },
38194092 .expect = .{
38204093 .ret_len = 1,
......@@ -3823,7 +4096,7 @@ pub const Intrinsic = enum {
38234096 .{ .kind = .{ .matches = 0 } },
38244097 .{ .kind = .{ .matches = 0 } },
38254098 },
3826 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4099 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = .all(.none) } },
38274100 },
38284101 .@"expect.with.probability" = .{
38294102 .ret_len = 1,
......@@ -3833,7 +4106,7 @@ pub const Intrinsic = enum {
38334106 .{ .kind = .{ .matches = 0 } },
38344107 .{ .kind = .{ .type = .double }, .attrs = &.{.immarg} },
38354108 },
3836 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4109 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = .all(.none) } },
38374110 },
38384111 .assume = .{
38394112 .ret_len = 0,
......@@ -3848,7 +4121,7 @@ pub const Intrinsic = enum {
38484121 .{ .kind = .overloaded },
38494122 .{ .kind = .{ .matches = 0 }, .attrs = &.{.returned} },
38504123 },
3851 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4124 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = .all(.none) } },
38524125 },
38534126 .@"type.test" = .{
38544127 .ret_len = 1,
......@@ -3857,7 +4130,7 @@ pub const Intrinsic = enum {
38574130 .{ .kind = .{ .type = .ptr } },
38584131 .{ .kind = .{ .type = .metadata } },
38594132 },
3860 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4133 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
38614134 },
38624135 .@"type.checked.load" = .{
38634136 .ret_len = 2,
......@@ -3868,7 +4141,7 @@ pub const Intrinsic = enum {
38684141 .{ .kind = .{ .type = .i32 } },
38694142 .{ .kind = .{ .type = .metadata } },
38704143 },
3871 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4144 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = .all(.none) } },
38724145 },
38734146 .@"type.checked.load.relative" = .{
38744147 .ret_len = 2,
......@@ -3879,7 +4152,7 @@ pub const Intrinsic = enum {
38794152 .{ .kind = .{ .type = .i32 } },
38804153 .{ .kind = .{ .type = .metadata } },
38814154 },
3882 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4155 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = .all(.none) } },
38834156 },
38844157 .@"arithmetic.fence" = .{
38854158 .ret_len = 1,
......@@ -3887,12 +4160,12 @@ pub const Intrinsic = enum {
38874160 .{ .kind = .overloaded },
38884161 .{ .kind = .{ .matches = 0 } },
38894162 },
3890 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4163 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
38914164 },
38924165 .donothing = .{
38934166 .ret_len = 0,
38944167 .params = &.{},
3895 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4168 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = .all(.none) } },
38964169 },
38974170 .@"load.relative" = .{
38984171 .ret_len = 1,
......@@ -3914,7 +4187,7 @@ pub const Intrinsic = enum {
39144187 .{ .kind = .{ .type = .i1 } },
39154188 .{ .kind = .overloaded },
39164189 },
3917 .attrs = &.{ .convergent, .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4190 .attrs = &.{ .convergent, .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = .all(.none) } },
39184191 },
39194192 .ptrmask = .{
39204193 .ret_len = 1,
......@@ -3923,7 +4196,7 @@ pub const Intrinsic = enum {
39234196 .{ .kind = .{ .matches = 0 } },
39244197 .{ .kind = .overloaded },
39254198 },
3926 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4199 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
39274200 },
39284201 .@"threadlocal.address" = .{
39294202 .ret_len = 1,
......@@ -3931,14 +4204,14 @@ pub const Intrinsic = enum {
39314204 .{ .kind = .overloaded, .attrs = &.{.nonnull} },
39324205 .{ .kind = .{ .matches = 0 }, .attrs = &.{.nonnull} },
39334206 },
3934 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4207 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
39354208 },
39364209 .vscale = .{
39374210 .ret_len = 1,
39384211 .params = &.{
39394212 .{ .kind = .overloaded },
39404213 },
3941 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4214 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = .all(.none) } },
39424215 },
39434216
39444217 .@"dbg.declare" = .{
......@@ -3948,7 +4221,7 @@ pub const Intrinsic = enum {
39484221 .{ .kind = .{ .type = .metadata } },
39494222 .{ .kind = .{ .type = .metadata } },
39504223 },
3951 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4224 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
39524225 },
39534226 .@"dbg.value" = .{
39544227 .ret_len = 0,
......@@ -3957,7 +4230,7 @@ pub const Intrinsic = enum {
39574230 .{ .kind = .{ .type = .metadata } },
39584231 .{ .kind = .{ .type = .metadata } },
39594232 },
3960 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4233 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
39614234 },
39624235
39634236 .@"amdgcn.workitem.id.x" = .{
......@@ -3965,42 +4238,42 @@ pub const Intrinsic = enum {
39654238 .params = &.{
39664239 .{ .kind = .{ .type = .i32 } },
39674240 },
3968 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4241 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
39694242 },
39704243 .@"amdgcn.workitem.id.y" = .{
39714244 .ret_len = 1,
39724245 .params = &.{
39734246 .{ .kind = .{ .type = .i32 } },
39744247 },
3975 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4248 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
39764249 },
39774250 .@"amdgcn.workitem.id.z" = .{
39784251 .ret_len = 1,
39794252 .params = &.{
39804253 .{ .kind = .{ .type = .i32 } },
39814254 },
3982 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4255 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
39834256 },
39844257 .@"amdgcn.workgroup.id.x" = .{
39854258 .ret_len = 1,
39864259 .params = &.{
39874260 .{ .kind = .{ .type = .i32 } },
39884261 },
3989 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4262 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
39904263 },
39914264 .@"amdgcn.workgroup.id.y" = .{
39924265 .ret_len = 1,
39934266 .params = &.{
39944267 .{ .kind = .{ .type = .i32 } },
39954268 },
3996 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4269 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
39974270 },
39984271 .@"amdgcn.workgroup.id.z" = .{
39994272 .ret_len = 1,
40004273 .params = &.{
40014274 .{ .kind = .{ .type = .i32 } },
40024275 },
4003 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4276 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
40044277 },
40054278 .@"amdgcn.dispatch.ptr" = .{
40064279 .ret_len = 1,
......@@ -4010,7 +4283,7 @@ pub const Intrinsic = enum {
40104283 .attrs = &.{.{ .@"align" = .wrap(.fromByteUnits(4)) }},
40114284 },
40124285 },
4013 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4286 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = .all(.none) } },
40144287 },
40154288
40164289 .@"nvvm.read.ptx.sreg.tid.x" = .{
......@@ -4085,7 +4358,7 @@ pub const Intrinsic = enum {
40854358 .{ .kind = .overloaded },
40864359 .{ .kind = .{ .type = .i32 } },
40874360 },
4088 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
4361 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = .all(.none) } },
40894362 },
40904363 .@"wasm.memory.grow" = .{
40914364 .ret_len = 1,
......@@ -4166,6 +4439,10 @@ pub const Function = struct {
41664439 self.ptr(builder).attributes = new_function_attributes;
41674440 }
41684441
4442 pub fn getAttributes(self: Index, builder: *Builder) FunctionAttributes {
4443 return self.ptr(builder).attributes;
4444 }
4445
41694446 pub fn setSection(self: Index, section: String, builder: *Builder) void {
41704447 self.ptr(builder).section = section;
41714448 }
......@@ -4487,7 +4764,7 @@ pub const Function = struct {
44874764 }
44884765
44894766 pub fn toValue(self: Instruction.Index) Value {
4490 return @fromBackingInt(@intCast(@backingInt(self)));
4767 return @fromBackingInt(@backingInt(self));
44914768 }
44924769
44934770 pub fn isTerminatorWip(self: Instruction.Index, wip: *const WipFunction) bool {
......@@ -4679,7 +4956,7 @@ pub const Function = struct {
46794956 .changeScalarAssumeCapacity(.i1, wip.builder),
46804957 .fneg,
46814958 .@"fneg fast",
4682 => @as(Value, @fromBackingInt(@intCast(instruction.data))).typeOfWip(wip),
4959 => @as(Value, @fromBackingInt(instruction.data)).typeOfWip(wip),
46834960 .getelementptr,
46844961 .@"getelementptr inbounds",
46854962 => {
......@@ -4871,7 +5148,7 @@ pub const Function = struct {
48715148 .changeScalarAssumeCapacity(.i1, builder),
48725149 .fneg,
48735150 .@"fneg fast",
4874 => @as(Value, @fromBackingInt(@intCast(instruction.data))).typeOf(function_index, builder),
5151 => @as(Value, @fromBackingInt(instruction.data)).typeOf(function_index, builder),
48755152 .getelementptr,
48765153 .@"getelementptr inbounds",
48775154 => {
......@@ -4963,7 +5240,7 @@ pub const Function = struct {
49635240
49645241 pub fn fromMetadata(metadata: Metadata) Weights {
49655242 assert(metadata.kind == .node);
4966 return @fromBackingInt(@intCast(metadata.index));
5243 return @fromBackingInt(metadata.index);
49675244 }
49685245
49695246 pub fn toMetadata(weights: Weights) Metadata {
......@@ -5156,7 +5433,7 @@ pub const Function = struct {
51565433 assert(argument.tag == .arg);
51575434 assert(argument.data == index);
51585435
5159 const argument_index: Instruction.Index = @fromBackingInt(@intCast(index));
5436 const argument_index: Instruction.Index = @fromBackingInt(index);
51605437 return argument_index.toValue();
51615438 }
51625439
......@@ -5202,7 +5479,7 @@ pub const Function = struct {
52025479 Type,
52035480 Value,
52045481 Instruction.BrCond.Weights,
5205 => @fromBackingInt(@intCast(value)),
5482 => @fromBackingInt(value),
52065483 MemoryAccessInfo,
52075484 Instruction.Alloca.Info,
52085485 Instruction.Call.Info,
......@@ -5327,7 +5604,7 @@ pub const WipFunction = struct {
53275604 assert(argument.tag == .arg);
53285605 assert(argument.data == index);
53295606
5330 const argument_index: Instruction.Index = @fromBackingInt(@intCast(index));
5607 const argument_index: Instruction.Index = @fromBackingInt(index);
53315608 return argument_index.toValue();
53325609 }
53335610
......@@ -6414,24 +6691,24 @@ pub const WipFunction = struct {
64146691 errdefer function.instructions.shrinkRetainingCapacity(0);
64156692
64166693 {
6417 var final_instruction_index: Instruction.Index = @fromBackingInt(@intCast(0));
6694 var final_instruction_index: Instruction.Index = @fromBackingInt(0);
64186695 for (0..params_len) |param_index| {
64196696 instructions.items[param_index] = final_instruction_index;
6420 final_instruction_index = @fromBackingInt(@intCast(@backingInt(final_instruction_index) + 1));
6697 final_instruction_index = @fromBackingInt(@backingInt(final_instruction_index) + 1);
64216698 }
64226699 for (blocks, self.blocks.items) |*final_block, current_block| {
64236700 assert(current_block.incoming == current_block.branches);
64246701 final_block.instruction = final_instruction_index;
6425 final_instruction_index = @fromBackingInt(@intCast(@backingInt(final_instruction_index) + 1));
6702 final_instruction_index = @fromBackingInt(@backingInt(final_instruction_index) + 1);
64266703 for (current_block.instructions.items) |instruction| {
64276704 instructions.items[@backingInt(instruction)] = final_instruction_index;
6428 final_instruction_index = @fromBackingInt(@intCast(@backingInt(final_instruction_index) + 1));
6705 final_instruction_index = @fromBackingInt(@backingInt(final_instruction_index) + 1);
64296706 }
64306707 }
64316708 }
64326709
64336710 var wip_name: struct {
6434 next_name: String = @fromBackingInt(@intCast(0)),
6711 next_name: String = @fromBackingInt(0),
64356712 next_unique_name: std.AutoHashMap(String, String),
64366713 builder: *Builder,
64376714
......@@ -6440,19 +6717,19 @@ pub const WipFunction = struct {
64406717 .none => return .none,
64416718 .empty => {
64426719 assert(wip_name.next_name != .none);
6443 defer wip_name.next_name = @fromBackingInt(@intCast(@backingInt(wip_name.next_name) + 1));
6720 defer wip_name.next_name = @fromBackingInt(@backingInt(wip_name.next_name) + 1);
64446721 return wip_name.next_name;
64456722 },
64466723 _ => {
64476724 assert(!name.isAnon());
64486725 const gop = try wip_name.next_unique_name.getOrPut(name);
64496726 if (!gop.found_existing) {
6450 gop.value_ptr.* = @fromBackingInt(@intCast(0));
6727 gop.value_ptr.* = @fromBackingInt(0);
64516728 return name;
64526729 }
64536730
64546731 while (true) {
6455 gop.value_ptr.* = @fromBackingInt(@intCast(@backingInt(gop.value_ptr.*) + 1));
6732 gop.value_ptr.* = @fromBackingInt(@backingInt(gop.value_ptr.*) + 1);
64566733 const unique_name = try wip_name.builder.fmt("{f}{s}{f}", .{
64576734 name.fmtRaw(wip_name.builder),
64586735 sep,
......@@ -6460,7 +6737,7 @@ pub const WipFunction = struct {
64606737 });
64616738 const unique_gop = try wip_name.next_unique_name.getOrPut(unique_name);
64626739 if (!unique_gop.found_existing) {
6463 unique_gop.value_ptr.* = @fromBackingInt(@intCast(0));
6740 unique_gop.value_ptr.* = @fromBackingInt(0);
64646741 return unique_name;
64656742 }
64666743 }
......@@ -6702,7 +6979,7 @@ pub const WipFunction = struct {
67026979 .fneg,
67036980 .@"fneg fast",
67046981 .ret,
6705 => instruction.data = @backingInt(instructions.map(@fromBackingInt(@intCast(instruction.data)))),
6982 => instruction.data = @backingInt(instructions.map(@fromBackingInt(instruction.data))),
67066983 .getelementptr,
67076984 .@"getelementptr inbounds",
67086985 => {
......@@ -7079,7 +7356,7 @@ pub const WipFunction = struct {
70797356 Type,
70807357 Value,
70817358 Instruction.BrCond.Weights,
7082 => @fromBackingInt(@intCast(value)),
7359 => @fromBackingInt(value),
70837360 MemoryAccessInfo,
70847361 Instruction.Alloca.Info,
70857362 Instruction.Call.Info,
......@@ -7268,7 +7545,7 @@ pub const Constant = enum(u32) {
72687545 no_init = (1 << 30) - 1,
72697546 _,
72707547
7271 const first_global: Constant = @fromBackingInt(@intCast(1 << 29));
7548 const first_global: Constant = @fromBackingInt(1 << 29);
72727549
72737550 pub const Tag = enum(u7) {
72747551 positive_integer,
......@@ -7405,7 +7682,18 @@ pub const Constant = enum(u32) {
74057682 val: Constant,
74067683 type: Type,
74077684
7408 pub const Signedness = enum { unsigned, signed, unneeded };
7685 pub const Signedness = enum {
7686 unsigned,
7687 signed,
7688 unneeded,
7689
7690 pub fn fromStdLang(signedness: std.lang.Signedness) Signedness {
7691 return switch (signedness) {
7692 .unsigned => .unsigned,
7693 .signed => .signed,
7694 };
7695 }
7696 };
74097697 };
74107698
74117699 pub const GetElementPtr = struct {
......@@ -7444,11 +7732,11 @@ pub const Constant = enum(u32) {
74447732 return if (@backingInt(self) < @backingInt(first_global))
74457733 .{ .constant = @intCast(@backingInt(self)) }
74467734 else
7447 .{ .global = @fromBackingInt(@intCast(@backingInt(self) - @backingInt(first_global))) };
7735 .{ .global = @fromBackingInt(@backingInt(self) - @backingInt(first_global)) };
74487736 }
74497737
74507738 pub fn toValue(self: Constant) Value {
7451 return @fromBackingInt(@intCast(Value.first_constant + @backingInt(self)));
7739 return @fromBackingInt(Value.first_constant + @backingInt(self));
74527740 }
74537741
74547742 pub fn typeOf(self: Constant, builder: *Builder) Type {
......@@ -7474,7 +7762,7 @@ pub const Constant = enum(u32) {
74747762 .zeroinitializer,
74757763 .undef,
74767764 .poison,
7477 => @fromBackingInt(@intCast(item.data)),
7765 => @fromBackingInt(item.data),
74787766 .structure,
74797767 .packed_structure,
74807768 .array,
......@@ -7482,7 +7770,7 @@ pub const Constant = enum(u32) {
74827770 => builder.constantExtraData(Aggregate, item.data).type,
74837771 .splat => builder.constantExtraData(Splat, item.data).type,
74847772 .string => builder.arrayTypeAssumeCapacity(
7485 @as(String, @fromBackingInt(@intCast(item.data))).slice(builder).?.len,
7773 @as(String, @fromBackingInt(item.data)).slice(builder).?.len,
74867774 .i8,
74877775 ),
74887776 .blockaddress => builder.ptrTypeAssumeCapacity(
......@@ -7491,7 +7779,7 @@ pub const Constant = enum(u32) {
74917779 ),
74927780 .dso_local_equivalent,
74937781 .no_cfi,
7494 => builder.ptrTypeAssumeCapacity(@as(Function.Index, @fromBackingInt(@intCast(item.data)))
7782 => builder.ptrTypeAssumeCapacity(@as(Function.Index, @fromBackingInt(item.data))
74957783 .ptrConst(builder).global.ptrConst(builder).addr_space),
74967784 .trunc,
74977785 .ptrtoint,
......@@ -7802,7 +8090,7 @@ pub const Constant = enum(u32) {
78028090 try w.writeByte('>');
78038091 },
78048092 .string => try w.print("c{f}", .{
7805 @as(String, @fromBackingInt(@intCast(item.data))).fmtQ(data.builder),
8093 @as(String, @fromBackingInt(item.data)).fmtQ(data.builder),
78068094 }),
78078095 .blockaddress => |tag| {
78088096 const extra = data.builder.constantExtraData(BlockAddress, item.data);
......@@ -7816,7 +8104,7 @@ pub const Constant = enum(u32) {
78168104 .dso_local_equivalent,
78178105 .no_cfi,
78188106 => |tag| {
7819 const function: Function.Index = @fromBackingInt(@intCast(item.data));
8107 const function: Function.Index = @fromBackingInt(item.data);
78208108 try w.print("{s} {f}", .{
78218109 @tagName(tag),
78228110 function.ptrConst(data.builder).global.fmt(data.builder),
......@@ -7920,9 +8208,9 @@ pub const Value = enum(u32) {
79208208 metadata: Metadata,
79218209 } {
79228210 return if (@backingInt(self) < first_constant)
7923 .{ .instruction = @fromBackingInt(@intCast(@backingInt(self))) }
8211 .{ .instruction = @fromBackingInt(@backingInt(self)) }
79248212 else if (@backingInt(self) < first_metadata)
7925 .{ .constant = @fromBackingInt(@intCast(@backingInt(self) - first_constant)) }
8213 .{ .constant = @fromBackingInt(@backingInt(self) - first_constant) }
79268214 else
79278215 .{ .metadata = @bitCast(@backingInt(self) - first_metadata) };
79288216 }
......@@ -8016,7 +8304,7 @@ pub const Metadata = packed struct(u32) {
80168304 return .{ .index = metadata.index, .kind = metadata.kind, .is_none = false };
80178305 }
80188306 pub fn toValue(metadata: Metadata) Value {
8019 return @fromBackingInt(@intCast(Value.first_metadata + @as(u32, @bitCast(metadata))));
8307 return @fromBackingInt(Value.first_metadata + @as(u32, @bitCast(metadata)));
80208308 }
80218309
80228310 pub const String = enum(u32) {
......@@ -8032,7 +8320,7 @@ pub const Metadata = packed struct(u32) {
80328320 pub fn unwrap(metadata: Metadata.String.Optional) ?Metadata.String {
80338321 return switch (metadata) {
80348322 .none => null,
8035 else => @fromBackingInt(@intCast(@backingInt(metadata))),
8323 else => @fromBackingInt(@backingInt(metadata)),
80368324 };
80378325 }
80388326 pub fn toMetadata(metadata: Metadata.String.Optional) Metadata.Optional {
......@@ -8040,7 +8328,7 @@ pub const Metadata = packed struct(u32) {
80408328 }
80418329 };
80428330 pub fn toOptional(metadata: Metadata.String) Metadata.String.Optional {
8043 return @fromBackingInt(@intCast(@backingInt(metadata)));
8331 return @fromBackingInt(@backingInt(metadata));
80448332 }
80458333 pub fn toMetadata(metadata: Metadata.String) Metadata {
80468334 return .{ .index = @intCast(@backingInt(metadata)), .kind = .string };
......@@ -8077,7 +8365,7 @@ pub const Metadata = packed struct(u32) {
80778365 };
80788366 pub fn toString(metadata: Metadata) Metadata.String {
80798367 assert(metadata.kind == .string);
8080 return @fromBackingInt(@intCast(metadata.index));
8368 return @fromBackingInt(metadata.index);
80818369 }
80828370
80838371 pub const Tag = enum(u6) {
......@@ -8542,7 +8830,7 @@ pub const Metadata = packed struct(u32) {
85428830 try w.writeByte(')');
85438831 },
85448832 .constant => try Constant.format(.{
8545 .constant = @fromBackingInt(@intCast(node_item.data)),
8833 .constant = @fromBackingInt(node_item.data),
85468834 .builder = builder,
85478835 .flags = data.specialized orelse .{},
85488836 }, w),
......@@ -8744,7 +9032,7 @@ pub fn init(options: Options) Allocator.Error!Builder {
87449032 .string_bytes = .empty,
87459033
87469034 .types = .empty,
8747 .next_unnamed_type = @fromBackingInt(@intCast(0)),
9035 .next_unnamed_type = @fromBackingInt(0),
87489036 .next_unique_type_id = .empty,
87499037 .type_map = .empty,
87509038 .type_items = .empty,
......@@ -8758,7 +9046,7 @@ pub fn init(options: Options) Allocator.Error!Builder {
87589046 .function_attributes_set = .empty,
87599047
87609048 .globals = .empty,
8761 .next_unnamed_global = @fromBackingInt(@intCast(0)),
9049 .next_unnamed_global = @fromBackingInt(0),
87629050 .next_replaced_global = .none,
87639051 .next_unique_global_id = .empty,
87649052 .aliases = .empty,
......@@ -8815,7 +9103,7 @@ pub fn init(options: Options) Allocator.Error!Builder {
88159103 assert(self.intTypeAssumeCapacity(bits) ==
88169104 @field(Type, std.fmt.comptimePrint("i{d}", .{bits})));
88179105 inline for (.{ 0, 4 }) |addr_space_index| {
8818 const addr_space: AddrSpace = @fromBackingInt(@intCast(addr_space_index));
9106 const addr_space: AddrSpace = @fromBackingInt(addr_space_index);
88199107 assert(self.ptrTypeAssumeCapacity(addr_space) ==
88209108 @field(Type, std.fmt.comptimePrint("ptr{f}", .{addr_space.fmt(" ")})));
88219109 }
......@@ -9092,17 +9380,17 @@ pub fn attrs(self: *Builder, attributes: []Attribute.Index) Allocator.Error!Attr
90929380 return @backingInt(lhs_kind) < @backingInt(rhs_kind);
90939381 }
90949382 }.lessThan);
9095 return @fromBackingInt(@intCast(try self.attrGeneric(@ptrCast(attributes))));
9383 return @fromBackingInt(try self.attrGeneric(@ptrCast(attributes)));
90969384}
90979385
90989386pub fn fnAttrs(self: *Builder, fn_attributes: []const Attributes) Allocator.Error!FunctionAttributes {
90999387 try self.function_attributes_set.ensureUnusedCapacity(self.gpa, 1);
9100 const function_attributes: FunctionAttributes = @fromBackingInt(@intCast(try self.attrGeneric(@ptrCast(
9388 const function_attributes: FunctionAttributes = @fromBackingInt(try self.attrGeneric(@ptrCast(
91019389 fn_attributes[0..if (std.mem.lastIndexOfNone(Attributes, fn_attributes, &.{.none})) |last|
91029390 last + 1
91039391 else
91049392 0],
9105 ))));
9393 )));
91069394
91079395 _ = self.function_attributes_set.getOrPutAssumeCapacity(function_attributes);
91089396 return function_attributes;
......@@ -9121,7 +9409,7 @@ pub fn addGlobalAssumeCapacity(self: *Builder, name: StrtabString, global: Globa
91219409 if (name == .empty) {
91229410 id = self.next_unnamed_global;
91239411 assert(id != self.next_replaced_global);
9124 self.next_unnamed_global = @fromBackingInt(@intCast(@backingInt(id) + 1));
9412 self.next_unnamed_global = @fromBackingInt(@backingInt(id) + 1);
91259413 }
91269414 while (true) {
91279415 const global_gop = self.globals.getOrPutAssumeCapacity(id);
......@@ -10058,7 +10346,7 @@ pub fn print(self: *Builder, w: *Writer) (Writer.Error || Allocator.Error)!void
1005810346 continue;
1005910347 },
1006010348 .br => |tag| {
10061 const target: Function.Block.Index = @fromBackingInt(@intCast(instruction.data));
10349 const target: Function.Block.Index = @fromBackingInt(instruction.data);
1006210350 try w.print(" {s} {f}", .{
1006310351 @tagName(tag), target.toInst(&function).fmt(function_index, self, .{ .percent = true }),
1006410352 });
......@@ -10187,7 +10475,7 @@ pub fn print(self: *Builder, w: *Writer) (Writer.Error || Allocator.Error)!void
1018710475 .fneg,
1018810476 .@"fneg fast",
1018910477 => |tag| {
10190 const val: Value = @fromBackingInt(@intCast(instruction.data));
10478 const val: Value = @fromBackingInt(instruction.data);
1019110479 try w.print(" %{f} = {s} {f}", .{
1019210480 instruction_index.name(&function).fmt(self),
1019310481 @tagName(tag),
......@@ -10288,7 +10576,7 @@ pub fn print(self: *Builder, w: *Writer) (Writer.Error || Allocator.Error)!void
1028810576 }
1028910577 },
1029010578 .ret => |tag| {
10291 const val: Value = @fromBackingInt(@intCast(instruction.data));
10579 const val: Value = @fromBackingInt(instruction.data);
1029210580 try w.print(" {s} {f}", .{
1029310581 @tagName(tag),
1029410582 val.fmt(function_index, self, .{ .percent = true }),
......@@ -11020,7 +11308,7 @@ fn opaqueTypeAssumeCapacity(self: *Builder, name: String) Type {
1102011308 if (name == .empty) {
1102111309 id = self.next_unnamed_type;
1102211310 assert(id != .none);
11023 self.next_unnamed_type = @fromBackingInt(@intCast(@backingInt(id) + 1));
11311 self.next_unnamed_type = @fromBackingInt(@backingInt(id) + 1);
1102411312 } else assert(!name.isAnon());
1102511313 while (true) {
1102611314 const type_gop = self.types.getOrPutAssumeCapacity(id);
......@@ -11135,7 +11423,7 @@ fn typeExtraDataTrail(
1113511423 ) |field_name, field_type, value|
1113611424 @field(result, field_name) = switch (field_type) {
1113711425 u32 => value,
11138 String, Type => @fromBackingInt(@intCast(value)),
11426 String, Type => @fromBackingInt(value),
1113911427 else => @compileError("bad field type: " ++ @typeName(field_type)),
1114011428 };
1114111429 return .{
......@@ -11746,7 +12034,7 @@ fn castConstAssumeCapacity(self: *Builder, tag: Constant.Tag, val: Constant, ty:
1174612034 return std.meta.eql(lhs_key.cast, rhs_extra);
1174712035 }
1174812036 };
11749 const data = Key{ .tag = tag, .cast = .{ .val = val, .type = ty } };
12037 const data: Key = .{ .tag = tag, .cast = .{ .val = val, .type = ty } };
1175012038 const gop = self.constant_map.getOrPutAssumeCapacityAdapted(data, Adapter{ .builder = self });
1175112039 if (!gop.found_existing) {
1175212040 gop.key_ptr.* = {};
......@@ -11828,10 +12116,10 @@ fn gepConstAssumeCapacity(
1182812116 std.mem.eql(Constant, lhs_key.indices, rhs_indices);
1182912117 }
1183012118 };
11831 const data = Key{
12119 const data: Key = .{
1183212120 .type = ty,
1183312121 .base = base,
11834 .inrange = if (inrange) |index| @fromBackingInt(@intCast(index)) else .none,
12122 .inrange = if (inrange) |index| @fromBackingInt(index) else .none,
1183512123 .indices = indices,
1183612124 };
1183712125 const gop = self.constant_map.getOrPutAssumeCapacityAdapted(data, Adapter{ .builder = self });
......@@ -11885,7 +12173,7 @@ fn binConstAssumeCapacity(
1188512173 return std.meta.eql(lhs_key.extra, rhs_extra);
1188612174 }
1188712175 };
11888 const data = Key{ .tag = tag, .extra = .{ .lhs = lhs, .rhs = rhs } };
12176 const data: Key = .{ .tag = tag, .extra = .{ .lhs = lhs, .rhs = rhs } };
1188912177 const gop = self.constant_map.getOrPutAssumeCapacityAdapted(data, Adapter{ .builder = self });
1189012178 if (!gop.found_existing) {
1189112179 gop.key_ptr.* = {};
......@@ -11924,8 +12212,8 @@ fn asmConstAssumeCapacity(
1192412212 }
1192512213 };
1192612214
11927 const data = Key{
11928 .tag = @fromBackingInt(@intCast(@backingInt(Constant.Tag.@"asm") + @as(u4, @bitCast(info)))),
12215 const data: Key = .{
12216 .tag = @fromBackingInt(@backingInt(Constant.Tag.@"asm") + @as(u4, @bitCast(info))),
1192912217 .extra = .{ .type = ty, .assembly = assembly, .constraints = constraints },
1193012218 };
1193112219 const gop = self.constant_map.getOrPutAssumeCapacityAdapted(data, Adapter{ .builder = self });
......@@ -12073,7 +12361,7 @@ fn constantExtraDataTrail(
1207312361 ) |field_name, field_type, value|
1207412362 @field(result, field_name) = switch (field_type) {
1207512363 u32 => value,
12076 String, Type, Constant, Function.Index, Function.Block.Index => @fromBackingInt(@intCast(value)),
12364 String, Type, Constant, Function.Index, Function.Block.Index => @fromBackingInt(value),
1207712365 Constant.GetElementPtr.Info => @bitCast(value),
1207812366 else => @compileError("bad field type: " ++ @typeName(field_type)),
1207912367 };
......@@ -12151,7 +12439,7 @@ fn metadataExtraDataTrail(
1215112439 ) |field_name, field_type, value|
1215212440 @field(result, field_name) = switch (field_type) {
1215312441 u32 => value,
12154 Metadata.String, Metadata.String.Optional, Variable.Index, Value => @fromBackingInt(@intCast(value)),
12442 Metadata.String, Metadata.String.Optional, Variable.Index, Value => @fromBackingInt(value),
1215512443 Metadata, Metadata.Optional, Metadata.DIFlags => @bitCast(value),
1215612444 else => @compileError("bad field type: " ++ @typeName(field_type)),
1215712445 };
......@@ -12759,8 +13047,8 @@ fn debugSubprogramAssumeCapacity(
1275913047 compile_unit: ?Metadata,
1276013048) Metadata {
1276113049 assert(!self.strip);
12762 const tag: Metadata.Tag = @fromBackingInt(@intCast(@backingInt(Metadata.Tag.subprogram) +
12763 @as(u3, @truncate(@as(u32, @bitCast(options.sp_flags)) >> 2))));
13050 const tag: Metadata.Tag = @fromBackingInt(@backingInt(Metadata.Tag.subprogram) +
13051 @as(u3, @truncate(@as(u32, @bitCast(options.sp_flags)) >> 2)));
1276413052 return self.metadataDistinctAssumeCapacity(tag, Metadata.Subprogram{
1276513053 .file = .wrap(file),
1276613054 .name = .wrap(name),
......@@ -13345,7 +13633,7 @@ fn metadataConstantAssumeCapacity(self: *Builder, constant: Constant) Metadata {
1334513633
1334613634 pub fn eql(ctx: @This(), lhs_key: Constant, _: void, rhs_index: usize) bool {
1334713635 if (Metadata.Tag.constant != ctx.builder.metadata_items.items(.tag)[rhs_index]) return false;
13348 const rhs_data: Constant = @fromBackingInt(@intCast(ctx.builder.metadata_items.items(.data)[rhs_index]));
13636 const rhs_data: Constant = @fromBackingInt(ctx.builder.metadata_items.items(.data)[rhs_index]);
1334913637 return rhs_data == lhs_key;
1335013638 }
1335113639 };
......@@ -13577,6 +13865,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1357713865 switch (attr_index.toAttribute(self)) {
1357813866 .zeroext,
1357913867 .signext,
13868 .noext,
1358013869 .inreg,
1358113870 .@"noalias",
1358213871 .nocapture,
......@@ -13594,11 +13883,13 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1359413883 .readnone,
1359513884 .readonly,
1359613885 .writeonly,
13886 .writable,
13887 .dead_on_unwind,
1359713888 .alwaysinline,
1359813889 .builtin,
1359913890 .cold,
1360013891 .convergent,
13601 .disable_sanitizer_information,
13892 .disable_sanitizer_instrumentation,
1360213893 .fn_ret_thunk_extern,
1360313894 .hot,
1360413895 .inlinehint,
......@@ -13607,6 +13898,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1360713898 .naked,
1360813899 .nobuiltin,
1360913900 .nocallback,
13901 .nodivergencesource,
1361013902 .noduplicate,
1361113903 .noimplicitfloat,
1361213904 .@"noinline",
......@@ -13623,6 +13915,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1362313915 .nosanitize_bounds,
1362413916 .nosanitize_coverage,
1362513917 .null_pointer_is_valid,
13918 .optdebug,
1362613919 .optforfuzzing,
1362713920 .optnone,
1362813921 .optsize,
......@@ -13633,18 +13926,21 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1363313926 .sanitize_thread,
1363413927 .sanitize_hwaddress,
1363513928 .sanitize_memtag,
13929 .sanitize_realtime,
13930 .sanitize_realtime_blocking,
13931 .sanitize_alloc_token,
1363613932 .speculative_load_hardening,
1363713933 .speculatable,
1363813934 .ssp,
1363913935 .sspstrong,
1364013936 .sspreq,
1364113937 .strictfp,
13938 .denormal_fpenv,
1364213939 .nocf_check,
1364313940 .shadowcallstack,
1364413941 .mustprogress,
13645 .no_sanitize_address,
13646 .no_sanitize_hwaddress,
13647 .sanitize_address_dyninit,
13942 .nooutline,
13943 .nocreateundeforpoison,
1364813944 => {
1364913945 try record.ensureUnusedCapacity(self.gpa, 2);
1365013946 record.appendAssumeCapacity(0);
......@@ -13670,6 +13966,12 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1367013966 record.appendAssumeCapacity(@backingInt(kind));
1367113967 record.appendAssumeCapacity(alignment.resolve(self).toByteUnits() orelse 0);
1367213968 },
13969 .captures => |captures| {
13970 try record.ensureUnusedCapacity(self.gpa, 3);
13971 record.appendAssumeCapacity(1);
13972 record.appendAssumeCapacity(@backingInt(kind));
13973 record.appendAssumeCapacity(@as(u32, @bitCast(captures)));
13974 },
1367313975 .dereferenceable,
1367413976 .dereferenceable_or_null,
1367513977 => |size| {
......@@ -13684,6 +13986,9 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1368413986 record.appendAssumeCapacity(@backingInt(kind));
1368513987 record.appendAssumeCapacity(@as(u32, @bitCast(fpclass)));
1368613988 },
13989 .initializes => @panic("TODO"),
13990 .dead_on_return => @panic("TODO"),
13991 .range => @panic("TODO"),
1368713992 .allockind => |allockind| {
1368813993 try record.ensureUnusedCapacity(self.gpa, 3);
1368913994 record.appendAssumeCapacity(1);
......@@ -14099,7 +14404,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1409914404 }
1410014405 },
1410114406 .string => {
14102 const str: String = @fromBackingInt(@intCast(data));
14407 const str: String = @fromBackingInt(data);
1410314408 if (str == .none) {
1410414409 try constants_block.writeAbbrev(ConstantsBlock.Null{});
1410514410 } else {
......@@ -14226,7 +14531,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1422614531 .dso_local_equivalent,
1422714532 .no_cfi,
1422814533 => |tag| {
14229 const function: Function.Index = @fromBackingInt(@intCast(data));
14534 const function: Function.Index = @fromBackingInt(data);
1423014535 try constants_block.writeAbbrev(ConstantsBlock.DsoLocalEquivalentOrNoCfi{
1423114536 .code = switch (tag) {
1423214537 .dso_local_equivalent => .DSO_LOCAL_EQUIVALENT,
......@@ -14609,7 +14914,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1460914914 }, metadata_adapter);
1461014915 },
1461114916 .constant => {
14612 const constant: Constant = @fromBackingInt(@intCast(data));
14917 const constant: Constant = @fromBackingInt(data);
1461314918 try metadata_block.writeAbbrevAdapted(MetadataBlock.Constant{
1461414919 .ty = constant.typeOf(self),
1461514920 .constant = constant,
......@@ -14778,7 +15083,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1477815083 var adapter: FunctionAdapter = .{
1477915084 .metadata_adapter = metadata_adapter,
1478015085 .func = &func,
14781 .instruction_index = @fromBackingInt(@intCast(0)),
15086 .instruction_index = @fromBackingInt(0),
1478215087 };
1478315088
1478415089 // Emit function level metadata block
......@@ -14789,7 +15094,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1478915094 for (func.debug_values) |value| {
1479015095 try metadata_block.writeAbbrev(MetadataBlock.Value{
1479115096 .ty = value.typeOf(@fromBackingInt(@intCast(func_index)), self),
14792 .value = @fromBackingInt(@intCast(adapter.getValueIndex(value.toValue()))),
15097 .value = @fromBackingInt(adapter.getValueIndex(value.toValue())),
1479315098 });
1479415099 }
1479515100
......@@ -15071,10 +15376,10 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1507115376 });
1507215377 },
1507315378 .fneg => try function_block.writeAbbrev(FunctionBlock.FNeg{
15074 .val = adapter.getOffsetValueIndex(@fromBackingInt(@intCast(data))),
15379 .val = adapter.getOffsetValueIndex(@fromBackingInt(data)),
1507515380 }),
1507615381 .@"fneg fast" => try function_block.writeAbbrev(FunctionBlock.FNegFast{
15077 .val = adapter.getOffsetValueIndex(@fromBackingInt(@intCast(data))),
15382 .val = adapter.getOffsetValueIndex(@fromBackingInt(data)),
1507815383 .fast_math = FastMath.fast,
1507915384 }),
1508015385 .extractvalue => {
......@@ -15274,7 +15579,7 @@ pub fn toBitcode(self: *Builder, allocator: Allocator, producer: Producer) bitco
1527415579 try function_block.writeUnabbrev(16, record.items);
1527515580 },
1527615581 .ret => try function_block.writeAbbrev(FunctionBlock.Ret{
15277 .val = adapter.getOffsetValueIndex(@fromBackingInt(@intCast(data))),
15582 .val = adapter.getOffsetValueIndex(@fromBackingInt(data)),
1527815583 }),
1527915584 .@"ret void" => try function_block.writeAbbrev(FunctionBlock.RetVoid{}),
1528015585 .atomicrmw => {