authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-01-20 00:04:49+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-04-25 21:54:48+02:00
log061c13f13b052bf40d30baae375a1abceeff63fa
treeec29ea822142b67519700fbe685f73b2b33db8d1
parent4eb8640213658185d2fb63b794560fc16d8707b6
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

Revert "std.mem: work around LoongArch inline asm bug in doNotOptimizeAway()"

This reverts commit e7f1624e6ea11bb30c779963f9fdfabd51902276. The bug was fixed in LLVM 22.

1 files changed, 1 insertions(+), 2 deletions(-)

lib/std/mem.zig+1-2
...@@ -4809,8 +4809,7 @@ pub fn doNotOptimizeAway(val: anytype) void {...@@ -4809,8 +4809,7 @@ pub fn doNotOptimizeAway(val: anytype) void {
4809 } else doNotOptimizeAway(&val);4809 } else doNotOptimizeAway(&val);
4810 },4810 },
4811 .float => {4811 .float => {
4812 // https://github.com/llvm/llvm-project/issues/1592004812 if ((t.float.bits == 32 or t.float.bits == 64) and builtin.zig_backend != .stage2_c) {
4813 if ((t.float.bits == 32 or t.float.bits == 64) and builtin.zig_backend != .stage2_c and !builtin.cpu.arch.isLoongArch()) {
4814 asm volatile (""4813 asm volatile (""
4815 :4814 :
4816 : [_] "rm" (val),4815 : [_] "rm" (val),