| author | |
| committer | |
| log | 032319c94257e650abc7a4743298154c218dba89 |
| tree | 75fbbf3d77bd237c319aa87ed0186a463202b9ab |
| parent | 83add375c4734a6091dfc31563482b1b7157c1d6 |
https://github.com/llvm/llvm-project/issues/186922 is pretty serious for
us, because it is causing the Zig compiler itself to get miscompiled in
many common configurations. I don't feel comfortable trying to work
around this by disabling certain CPU features, because that seems
incredibly brittle. I think it's probably best we disable loop
vectorization entirely until we upgrade to a version of LLVM where this
bug is fixed.
This will pessimise codegen in some cases, which is unfortunate, but
that's preferable to miscompilations.1 files changed, 1 insertions(+), 1 deletions(-)
src/zig_llvm.cpp+1-1| ... | ... | @@ -285,7 +285,7 @@ ZIG_EXTERN_C bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machi |
| 285 | 285 | PipelineTuningOptions pipeline_opts; |
| 286 | 286 | pipeline_opts.LoopUnrolling = !options->is_debug; |
| 287 | 287 | pipeline_opts.SLPVectorization = !options->is_debug; |
| 288 | pipeline_opts.LoopVectorization = !options->is_debug; | |
| 288 | pipeline_opts.LoopVectorization = false; // https://github.com/llvm/llvm-project/issues/186922 | |
| 289 | 289 | pipeline_opts.LoopInterleaving = !options->is_debug; |
| 290 | 290 | pipeline_opts.MergeFunctions = !options->is_debug; |
| 291 | 291 |