From c8b6e407baa30b41693301fcbf0a17bd3432619b Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 11 Nov 2020 17:07:56 +0100 Subject: [PATCH] Enable loop interleaving when unrolling is enabled This mimics clang's default behavior. --- src/zig_llvm.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp index 1a81cf33ef..73864569bb 100644 --- a/src/zig_llvm.cpp +++ b/src/zig_llvm.cpp @@ -221,6 +221,7 @@ bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMM PMBuilder->DisableUnrollLoops = is_debug; PMBuilder->SLPVectorize = !is_debug; PMBuilder->LoopVectorize = !is_debug; + PMBuilder->LoopsInterleaved = !PMBuilder->DisableUnrollLoops; PMBuilder->RerollLoops = !is_debug; // Leaving NewGVN as default (off) because when on it caused issue #673 //PMBuilder->NewGVN = !is_debug;