summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/LoopDistribute/basic.ll
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2016-12-21 04:07:40 +0000
committerAdam Nemet <anemet@apple.com>2016-12-21 04:07:40 +0000
commit32e6a34c02e625184f0a108a5d5c23a6cd90234c (patch)
tree889f62a67831f0b9bcd6eea3bff50c9705045e3b /llvm/test/Transforms/LoopDistribute/basic.ll
parent1857800cb56caea13cee1e7e664d123274624322 (diff)
downloadbcm5719-llvm-32e6a34c02e625184f0a108a5d5c23a6cd90234c.tar.gz
bcm5719-llvm-32e6a34c02e625184f0a108a5d5c23a6cd90234c.zip
[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
Diffstat (limited to 'llvm/test/Transforms/LoopDistribute/basic.ll')
-rw-r--r--llvm/test/Transforms/LoopDistribute/basic.ll6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/test/Transforms/LoopDistribute/basic.ll b/llvm/test/Transforms/LoopDistribute/basic.ll
index f19fa8bb1b1..97296c2d123 100644
--- a/llvm/test/Transforms/LoopDistribute/basic.ll
+++ b/llvm/test/Transforms/LoopDistribute/basic.ll
@@ -1,10 +1,10 @@
-; RUN: opt -basicaa -loop-distribute -verify-loop-info -verify-dom-info -S \
+; RUN: opt -basicaa -loop-distribute -enable-loop-distribute -verify-loop-info -verify-dom-info -S \
; RUN: < %s | FileCheck %s
-; RUN: opt -basicaa -loop-distribute -verify-loop-info -verify-dom-info \
+; RUN: opt -basicaa -loop-distribute -enable-loop-distribute -verify-loop-info -verify-dom-info \
; RUN: -loop-accesses -analyze < %s | FileCheck %s --check-prefix=ANALYSIS
-; RUN: opt -basicaa -loop-distribute -loop-vectorize -force-vector-width=4 -S \
+; RUN: opt -basicaa -loop-distribute -enable-loop-distribute -loop-vectorize -force-vector-width=4 -S \
; RUN: < %s | FileCheck %s --check-prefix=VECTORIZE
; We should distribute this loop into a safe (2nd statement) and unsafe loop
OpenPOWER on IntegriCloud