summaryrefslogtreecommitdiff
path: root/test/Other
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2014-05-06 19:14:00 +0000
committerDiego Novillo <dnovillo@google.com>2014-05-06 19:14:00 +0000
commite3e870facee9f1fcf5b19f15a3deb78b582fb37e (patch)
tree9dcdfd8bf30359bfa81748787b1c2480cceeef0c /test/Other
parent2c06cd8612adc919da3c5c5b02d2bb05487dd5f9 (diff)
downloadllvm-e3e870facee9f1fcf5b19f15a3deb78b582fb37e.tar.gz
llvm-e3e870facee9f1fcf5b19f15a3deb78b582fb37e.tar.bz2
llvm-e3e870facee9f1fcf5b19f15a3deb78b582fb37e.tar.xz
Do not make -pass-remarks additive.
Summary: When I initially introduced -pass-remarks, I thought it would be a neat idea to make it additive. So, if one used it as: $ llc -pass-remarks=inliner --pass-remarks=loop.* the compiler would build the regular expression '(inliner)|(loop.*)'. The more I think about it, the more I regret it. This is not how other flags work. The standard semantics are right-to-left overrides. This is how clang interprets -Rpass. And I think the two should be compatible in this respect. Reviewers: qcolombet Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D3614 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208122 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Other')
-rw-r--r--test/Other/optimization-remarks-inline.ll7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Other/optimization-remarks-inline.ll b/test/Other/optimization-remarks-inline.ll
index 4870c17ae2..566b206919 100644
--- a/test/Other/optimization-remarks-inline.ll
+++ b/test/Other/optimization-remarks-inline.ll
@@ -1,7 +1,14 @@
; RUN: opt < %s -inline -pass-remarks='inline' -S 2>&1 | FileCheck %s
; RUN: opt < %s -inline -pass-remarks='inl.*' -S 2>&1 | FileCheck %s
; RUN: opt < %s -inline -pass-remarks='vector' -pass-remarks='inl' -S 2>&1 | FileCheck %s
+
+; These two should not yield an inline remark for the same reason.
+; In the first command, we only ask for vectorizer remarks, in the
+; second one we ask for the inliner, but we then ask for the vectorizer
+; (thus overriding the first flag).
; RUN: opt < %s -inline -pass-remarks='vector' -S 2>&1 | FileCheck --check-prefix=REMARKS %s
+; RUN: opt < %s -inline -pass-remarks='inl' -pass-remarks='vector' -S 2>&1 | FileCheck --check-prefix=REMARKS %s
+
; RUN: opt < %s -inline -S 2>&1 | FileCheck --check-prefix=REMARKS %s
; RUN: not opt < %s -pass-remarks='(' 2>&1 | FileCheck --check-prefix=BAD-REGEXP %s