spirv: don't generate OpUnreachable after noreturn call

It seems that these are now automatically added to AIR in Sema.
This commit is contained in:
Robin Voetter
2024-10-13 01:57:35 +02:00
parent 973f846251
commit c1132edd53

View File

@@ -6544,10 +6544,6 @@ const NavGen = struct {
.id_ref_3 = params[0..n_params],
});
if (return_type == .noreturn_type) {
try self.func.body.emit(self.spv.gpa, .OpUnreachable, {});
}
if (self.liveness.isUnused(inst) or !Type.fromInterned(return_type).hasRuntimeBitsIgnoreComptime(zcu)) {
return null;
}