| ... | ... | @@ -5244,7 +5244,7 @@ pub const FuncGen = struct { |
| 5244 | 5244 | const operand_ty = self.air.typeOf(pl_op.operand); |
| 5245 | 5245 | const name = self.air.nullTerminatedString(pl_op.payload); |
| 5246 | 5246 | |
| 5247 | | if (needDbgVarWorkaround(self.dg, operand_ty)) { |
| 5247 | if (needDbgVarWorkaround(self.dg)) { |
| 5248 | 5248 | return null; |
| 5249 | 5249 | } |
| 5250 | 5250 | |
| ... | ... | @@ -6988,7 +6988,7 @@ pub const FuncGen = struct { |
| 6988 | 6988 | |
| 6989 | 6989 | const inst_ty = self.air.typeOfIndex(inst); |
| 6990 | 6990 | if (self.dg.object.di_builder) |dib| { |
| 6991 | | if (needDbgVarWorkaround(self.dg, inst_ty)) { |
| 6991 | if (needDbgVarWorkaround(self.dg)) { |
| 6992 | 6992 | return arg_val; |
| 6993 | 6993 | } |
| 6994 | 6994 | |
| ... | ... | @@ -9255,13 +9255,11 @@ const AnnotatedDITypePtr = enum(usize) { |
| 9255 | 9255 | const lt_errors_fn_name = "__zig_lt_errors_len"; |
| 9256 | 9256 | |
| 9257 | 9257 | /// Without this workaround, LLVM crashes with "unknown codeview register H1" |
| 9258 | | /// TODO use llvm-reduce and file upstream LLVM bug for this. |
| 9259 | | fn needDbgVarWorkaround(dg: *DeclGen, ty: Type) bool { |
| 9260 | | if (ty.tag() == .f16) { |
| 9261 | | const target = dg.module.getTarget(); |
| 9262 | | if (target.os.tag == .windows and target.cpu.arch == .aarch64) { |
| 9263 | | return true; |
| 9264 | | } |
| 9258 | /// https://github.com/llvm/llvm-project/issues/56484 |
| 9259 | fn needDbgVarWorkaround(dg: *DeclGen) bool { |
| 9260 | const target = dg.module.getTarget(); |
| 9261 | if (target.os.tag == .windows and target.cpu.arch == .aarch64) { |
| 9262 | return true; |
| 9265 | 9263 | } |
| 9266 | 9264 | return false; |
| 9267 | 9265 | } |