large generated code size in ReleaseSmall
#22277
Labels
bug
Observed behavior contradicts documented or intended behavior
ReleaseSmall
#22277
Zig Version
0.14.0-dev.2540+f857bf72e
Steps to Reproduce and Observed Behavior
Compile
memset
from compiler-rt:This target generates a 1894 byte memset function whereas
-OReleaseFast
generates a 209 byte function. The same issue is also present for other cpus as well here is the sample ofx86_64
architectures that I checked:ReleaseSmall
ReleaseFast
znver1
znver2
znver3
znver4
znver5
raptorlake
alderlake
rocketlake
tigerlake
skylake
The above table only has
rocketlake
andtigerlake
producing smaller code inReleaseSmall
.Expected Behavior
ReleaseSmall
should generate less code thanReleaseFast
(or at the very least be close).I'm not sure if this is a strictly LLVM problem (and hence needs to be kicked upstream) or if Zig should be telling LLVM to do something a bit differently, but the code sizes for
znver{1,2,3}
and{raptor,alder,sky}lake
looks worrying.The text was updated successfully, but these errors were encountered: