From 32e6a34c02e625184f0a108a5d5c23a6cd90234c Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Wed, 21 Dec 2016 04:07:40 +0000 Subject: [LDist] Match behavior between invoking via optimization pipeline or opt -loop-distribute In r267672, where the loop distribution pragma was introduced, I tried it hard to keep the old behavior for opt: when opt is invoked with -loop-distribute, it should distribute the loop (it's off by default when ran via the optimization pipeline). As MichaelZ has discovered this has the unintended consequence of breaking a very common developer work-flow to reproduce compilations using opt: First you print the pass pipeline of clang with -debug-pass=Arguments and then invoking opt with the returned arguments. clang -debug-pass will include -loop-distribute but the pass is invoked with default=off so nothing happens unless the loop carries the pragma. While through opt (default=on) we will try to distribute all loops. This changes opt's default to off as well to match clang. The tests are modified to explicitly enable the transformation. llvm-svn: 290235 --- .../Transforms/LoopVersioning/exit-block-dominates-rt-check-block.ll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/test/Transforms/LoopVersioning/exit-block-dominates-rt-check-block.ll') diff --git a/llvm/test/Transforms/LoopVersioning/exit-block-dominates-rt-check-block.ll b/llvm/test/Transforms/LoopVersioning/exit-block-dominates-rt-check-block.ll index 51bfb28bdb1..960c890516c 100644 --- a/llvm/test/Transforms/LoopVersioning/exit-block-dominates-rt-check-block.ll +++ b/llvm/test/Transforms/LoopVersioning/exit-block-dominates-rt-check-block.ll @@ -2,8 +2,8 @@ ; if the exit block of the loop (bb0) dominates the runtime check block ; (bb1 will become the runtime check block). -; RUN: opt -loop-distribute -verify-dom-info -S -o - %s > %t -; RUN: opt -loop-simplify -loop-distribute -verify-dom-info -S -o - %s > %t +; RUN: opt -loop-distribute -enable-loop-distribute -verify-dom-info -S -o - %s > %t +; RUN: opt -loop-simplify -loop-distribute -enable-loop-distribute -verify-dom-info -S -o - %s > %t ; RUN: FileCheck --check-prefix CHECK-VERSIONING -input-file %t %s ; RUN: opt -loop-versioning -verify-dom-info -S -o - %s > %t -- cgit v1.2.3