Closed Validark closed 2 months ago
We don't specifically emit st2
in Zig. That's the result of LLVM optimizations.
If there's a missed optimization here, you should see if that's still the case with the latest LLVM, and if so, file a bug with them.
We don't specifically emit
st2
in Zig. That's the result of LLVM optimizations.If there's a missed optimization here, you should see if that's still the case with the latest LLVM, and if so, file a bug with them.
My mistake. How do I dump the unoptimized LLVM IR?
--verbose-llvm-ir
instead of -femit-llvm-ir
.
Sorry, what do you mean by "missed emit"? It looks like it's being emitted in the godbolt link.
Ah, I understand now sorry, you meant the instruction!
That would be an LLVM issue, not a Zig issue I think.
Closing in favor of https://github.com/llvm/llvm-project/issues/107099
Zig Version
0.14.0-dev.1411+a670f5519
Steps to Reproduce and Observed Behavior
Zig godbolt link
Compiled for apple_latest, we only properly get
st2
emitted.Zig LLVM dump via:
zig build-obj ./src/llvm_code.zig -O ReleaseFast -target aarch64-linux -mcpu apple_latest -femit-llvm-ir -fstrip
Expected Behavior
st3
andst4
should be properly emitted