2014-02-25 08:30:04 +08:00
|
|
|
// REQUIRES: clang-driver
|
|
|
|
|
2013-04-04 14:29:47 +08:00
|
|
|
// RUN: %clang -### -S -fasm -fblocks -fbuiltin -fno-math-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fmath-errno -fno-common -fno-pascal-strings -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fsplit-stack %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS1 %s
|
2010-10-08 08:25:19 +08:00
|
|
|
// RUN: %clang -### -S -fasm -fblocks -fbuiltin -fno-math-errno -fcommon -fpascal-strings -fno-asm -fno-blocks -fno-builtin -fmath-errno -fno-common -fno-pascal-strings -fno-show-source-location -fshort-enums -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS2 %s
|
2009-12-12 08:38:18 +08:00
|
|
|
|
2013-04-04 14:29:47 +08:00
|
|
|
// CHECK-OPTIONS1: -split-stacks
|
2010-05-22 10:21:53 +08:00
|
|
|
// CHECK-OPTIONS1: -fgnu-keywords
|
2009-12-12 08:42:52 +08:00
|
|
|
// CHECK-OPTIONS1: -fblocks
|
|
|
|
// CHECK-OPTIONS1: -fpascal-strings
|
|
|
|
|
2010-01-08 10:20:44 +08:00
|
|
|
// CHECK-OPTIONS2: -fmath-errno
|
2014-02-16 15:29:41 +08:00
|
|
|
// CHECK-OPTIONS2: -fno-gnu-keywords
|
2009-12-12 08:42:52 +08:00
|
|
|
// CHECK-OPTIONS2: -fno-builtin
|
2010-10-08 08:25:19 +08:00
|
|
|
// CHECK-OPTIONS2: -fshort-enums
|
2009-12-13 10:00:23 +08:00
|
|
|
// CHECK-OPTIONS2: -fshort-wchar
|
2009-12-12 08:42:52 +08:00
|
|
|
// CHECK-OPTIONS2: -fno-common
|
|
|
|
// CHECK-OPTIONS2: -fno-show-source-location
|
2011-04-23 14:30:43 +08:00
|
|
|
|
|
|
|
// RUN: %clang -### -S -Wwrite-strings %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS1 %s
|
|
|
|
// WRITE-STRINGS1: -fconst-strings
|
|
|
|
// RUN: %clang -### -S -Wwrite-strings -Wno-write-strings %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS2 %s
|
|
|
|
// WRITE-STRINGS2-NOT: -fconst-strings
|
2014-02-07 16:33:28 +08:00
|
|
|
// RUN: %clang -### -S -Wwrite-strings -w %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS3 %s
|
|
|
|
// WRITE-STRINGS3-NOT: -fconst-strings
|
2011-04-23 17:27:53 +08:00
|
|
|
|
2011-04-24 03:48:40 +08:00
|
|
|
// RUN: %clang -### -x c++ -c %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s
|
|
|
|
// RUN: %clang -### -x c++ -c -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s
|
|
|
|
// RUN: %clang -### -x c++ -c -Wno-deprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s
|
|
|
|
// RUN: %clang -### -x c++ -c -Wno-deprecated -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s
|
|
|
|
// RUN: %clang -### -x c++ -c -w %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s
|
|
|
|
// RUN: %clang -### -c %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s
|
|
|
|
// RUN: %clang -### -c -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s
|
|
|
|
// DEPRECATED-ON-CHECK: -fdeprecated-macro
|
|
|
|
// DEPRECATED-OFF-CHECK-NOT: -fdeprecated-macro
|
2012-07-06 08:59:19 +08:00
|
|
|
|
|
|
|
// RUN: %clang -### -S -ffp-contract=fast %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-FAST-CHECK %s
|
set the underlying value of “#pragma STDC FP_CONTRACT” on by default
Clang has the default FP contraction setting of “-ffp-contract=on”, which
doesn't really mean “on” in the conventional sense of the word, but rather
really means “according to the per-statement effective value of the relevant
pragma”.
Before this patch, Clang has that pragma defaulting to “off”. Since the
“-ffp-contract=on” mode is really an AND of two booleans and the second of them
defaults to “off”, the whole thing effectively defaults to “off”. This patch
changes the default value of the pragma to “on”, thus making the default pair of
booleans (on, on) rather than (on, off). This makes FP optimization slightly
more aggressive than before when not using either “-Ofast”, “-ffast-math”, or
“-ffp-contract=fast”. Even with this patch the compiler still respects
“-ffp-contract=off”.
As per a suggestion by Steve Canon, the added code does _not_ require “-O3” or
higher. This is so as to try our best to preserve identical floating-point
results for unchanged source code compiling for an unchanged target when only
changing from any optimization level in the set (“-O0”, “-O1”, “-O2”, “-O3”) to
any other optimization level in that set. “-Os” and “-Oz” seem to be behaving
identically, i.e. should probably be considered a part of the aforementioned
set, but I have not reviewed this rigorously. “-Ofast” is explicitly _not_ a
member of that set.
Patch authored by Abe Skolnik [a.skolnik@samsung.com] and Stephen Canon [scanon@apple.com].
Differential Revision: https://reviews.llvm.org/D24481
llvm-svn: 282259
2016-09-24 00:16:25 +08:00
|
|
|
// RUN: %clang -### -S -ffast-math %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-FAST-CHECK %s
|
|
|
|
// RUN: %clang -### -S -ffp-contract=off %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-OFF-CHECK %s
|
|
|
|
// RUN: %clang -### -S -ffp-contract=on %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-ON-CHECK %s
|
|
|
|
|
2012-07-06 08:59:19 +08:00
|
|
|
// FP-CONTRACT-FAST-CHECK: -ffp-contract=fast
|
set the underlying value of “#pragma STDC FP_CONTRACT” on by default
Clang has the default FP contraction setting of “-ffp-contract=on”, which
doesn't really mean “on” in the conventional sense of the word, but rather
really means “according to the per-statement effective value of the relevant
pragma”.
Before this patch, Clang has that pragma defaulting to “off”. Since the
“-ffp-contract=on” mode is really an AND of two booleans and the second of them
defaults to “off”, the whole thing effectively defaults to “off”. This patch
changes the default value of the pragma to “on”, thus making the default pair of
booleans (on, on) rather than (on, off). This makes FP optimization slightly
more aggressive than before when not using either “-Ofast”, “-ffast-math”, or
“-ffp-contract=fast”. Even with this patch the compiler still respects
“-ffp-contract=off”.
As per a suggestion by Steve Canon, the added code does _not_ require “-O3” or
higher. This is so as to try our best to preserve identical floating-point
results for unchanged source code compiling for an unchanged target when only
changing from any optimization level in the set (“-O0”, “-O1”, “-O2”, “-O3”) to
any other optimization level in that set. “-Os” and “-Oz” seem to be behaving
identically, i.e. should probably be considered a part of the aforementioned
set, but I have not reviewed this rigorously. “-Ofast” is explicitly _not_ a
member of that set.
Patch authored by Abe Skolnik [a.skolnik@samsung.com] and Stephen Canon [scanon@apple.com].
Differential Revision: https://reviews.llvm.org/D24481
llvm-svn: 282259
2016-09-24 00:16:25 +08:00
|
|
|
// FP-CONTRACT-OFF-CHECK: -ffp-contract=off
|
|
|
|
// FP-CONTRACT-ON-CHECK: -ffp-contract=on
|
2012-07-21 05:20:33 +08:00
|
|
|
|
2013-08-08 16:34:35 +08:00
|
|
|
// RUN: %clang -### -S -funroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-UNROLL-LOOPS %s
|
|
|
|
// RUN: %clang -### -S -fno-unroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-UNROLL-LOOPS %s
|
|
|
|
// RUN: %clang -### -S -fno-unroll-loops -funroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-UNROLL-LOOPS %s
|
|
|
|
// RUN: %clang -### -S -funroll-loops -fno-unroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-UNROLL-LOOPS %s
|
|
|
|
// CHECK-UNROLL-LOOPS: "-funroll-loops"
|
|
|
|
// CHECK-NO-UNROLL-LOOPS: "-fno-unroll-loops"
|
|
|
|
|
2013-11-18 00:03:29 +08:00
|
|
|
// RUN: %clang -### -S -freroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-REROLL-LOOPS %s
|
|
|
|
// RUN: %clang -### -S -fno-reroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-REROLL-LOOPS %s
|
|
|
|
// RUN: %clang -### -S -fno-reroll-loops -freroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-REROLL-LOOPS %s
|
|
|
|
// RUN: %clang -### -S -freroll-loops -fno-reroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-REROLL-LOOPS %s
|
|
|
|
// CHECK-REROLL-LOOPS: "-freroll-loops"
|
|
|
|
// CHECK-NO-REROLL-LOOPS-NOT: "-freroll-loops"
|
|
|
|
|
2013-11-13 20:22:39 +08:00
|
|
|
// RUN: %clang -### -S -fprofile-sample-use=%S/Inputs/file.prof %s 2>&1 | FileCheck -check-prefix=CHECK-SAMPLE-PROFILE %s
|
|
|
|
// CHECK-SAMPLE-PROFILE: "-fprofile-sample-use={{.*}}/file.prof"
|
|
|
|
|
2013-12-07 01:58:19 +08:00
|
|
|
// RUN: %clang -### -S -fauto-profile=%S/Inputs/file.prof %s 2>&1 | FileCheck -check-prefix=CHECK-AUTO-PROFILE %s
|
|
|
|
// CHECK-AUTO-PROFILE: "-fprofile-sample-use={{.*}}/file.prof"
|
|
|
|
|
2014-08-07 11:58:32 +08:00
|
|
|
// RUN: %clang -### -S -fprofile-arcs %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-ARCS %s
|
|
|
|
// RUN: %clang -### -S -fno-profile-arcs -fprofile-arcs %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-ARCS %s
|
|
|
|
// RUN: %clang -### -S -fno-profile-arcs %s 2>&1 | FileCheck -check-prefix=CHECK-NO-PROFILE-ARCS %s
|
|
|
|
// RUN: %clang -### -S -fprofile-arcs -fno-profile-arcs %s 2>&1 | FileCheck -check-prefix=CHECK-NO-PROFILE-ARCS %s
|
|
|
|
// CHECK-PROFILE-ARCS: "-femit-coverage-data"
|
|
|
|
// CHECK-NO-PROFILE-ARCS-NOT: "-femit-coverage-data"
|
|
|
|
|
2016-09-01 07:04:32 +08:00
|
|
|
// RUN: %clang -### -S -fprofile-dir=abc %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-DIR-UNUSED %s
|
|
|
|
// RUN: %clang -### -S -ftest-coverage -fprofile-dir=abc %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-DIR-UNUSED %s
|
|
|
|
// RUN: %clang -### -S -fprofile-arcs -fprofile-dir=abc %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-DIR %s
|
|
|
|
// RUN: %clang -### -S --coverage -fprofile-dir=abc %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-DIR %s
|
|
|
|
// RUN: %clang -### -S -fprofile-arcs -fno-profile-arcs -fprofile-dir=abc %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-DIR-NEITHER %s
|
|
|
|
// CHECK-PROFILE-DIR: "-coverage-data-file" "abc
|
|
|
|
// CHECK-PROFILE-DIR-UNUSED: argument unused
|
|
|
|
// CHECK-PROFILE-DIR-UNUSED-NOT: "-coverage-data-file" "abc
|
|
|
|
// CHECK-PROFILE-DIR-NEITHER-NOT: argument unused
|
|
|
|
|
2016-07-16 10:54:58 +08:00
|
|
|
// RUN: %clang -### -S -fprofile-generate %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE-LLVM %s
|
2015-07-10 01:23:53 +08:00
|
|
|
// RUN: %clang -### -S -fprofile-instr-generate %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-generate=/some/dir %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE-DIR %s
|
|
|
|
// RUN: %clang -### -S -fprofile-instr-generate=/tmp/somefile.profraw %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE-FILE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-generate -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-generate -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-generate -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-generate -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-instr-generate -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-instr-generate -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-instr-generate -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-instr-generate -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-instr-generate=file -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-instr-generate=file -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-instr-generate=file -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-instr-generate=file -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-generate=dir -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-generate=dir -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-generate=dir -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-generate=dir -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s
|
2015-08-06 05:49:51 +08:00
|
|
|
// RUN: %clang -### -S -fprofile-instr-generate=file -fno-profile-instr-generate %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-GEN %s
|
2016-07-16 10:54:58 +08:00
|
|
|
// RUN: %clang -### -S -fprofile-instr-generate -fprofile-generate %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GENERATE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-instr-generate -fprofile-generate=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GENERATE %s
|
2015-08-06 05:49:51 +08:00
|
|
|
// RUN: %clang -### -S -fprofile-generate=dir -fno-profile-generate %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-GEN %s
|
|
|
|
// RUN: %clang -### -S -fprofile-instr-use=file -fno-profile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-instr-use=file -fno-profile-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-use=file -fno-profile-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-use=file -fno-profile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s
|
2015-08-06 07:27:40 +08:00
|
|
|
// RUN: %clang -### -S -fcoverage-mapping %s 2>&1 | FileCheck -check-prefix=CHECK-COVERAGE-AND-GEN %s
|
|
|
|
// RUN: %clang -### -S -fcoverage-mapping -fno-coverage-mapping %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-COVERAGE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-instr-generate -fcoverage-mapping -fno-coverage-mapping %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-COVERAGE %s
|
2016-02-05 02:39:09 +08:00
|
|
|
// CHECK-PROFILE-GENERATE: "-fprofile-instrument=clang"
|
2016-07-16 10:54:58 +08:00
|
|
|
// CHECK-PROFILE-GENERATE-LLVM: "-fprofile-instrument=llvm"
|
2016-07-23 06:25:01 +08:00
|
|
|
// CHECK-PROFILE-GENERATE-DIR: "-fprofile-instrument-path=/some/dir{{/|\\\\}}{{.*}}"
|
2016-02-05 02:39:09 +08:00
|
|
|
// CHECK-PROFILE-GENERATE-FILE: "-fprofile-instrument-path=/tmp/somefile.profraw"
|
2015-07-10 01:23:53 +08:00
|
|
|
// CHECK-NO-MIX-GEN-USE: '{{[a-z=-]*}}' not allowed with '{{[a-z=-]*}}'
|
2016-07-16 10:54:58 +08:00
|
|
|
// CHECK-NO-MIX-GENERATE: '{{[a-z=-]*}}' not allowed with '{{[a-z=-]*}}'
|
2016-02-05 02:39:09 +08:00
|
|
|
// CHECK-DISABLE-GEN-NOT: "-fprofile-instrument=clang"
|
2015-08-06 05:49:51 +08:00
|
|
|
// CHECK-DISABLE-USE-NOT: "-fprofile-instr-use"
|
2015-08-06 07:27:40 +08:00
|
|
|
// CHECK-COVERAGE-AND-GEN: '-fcoverage-mapping' only allowed with '-fprofile-instr-generate'
|
|
|
|
// CHECK-DISABLE-COVERAGE-NOT: "-fcoverage-mapping"
|
2015-07-10 01:23:53 +08:00
|
|
|
|
|
|
|
// RUN: %clang -### -S -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE %s
|
|
|
|
// RUN: %clang -### -S -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE %s
|
|
|
|
// RUN: mkdir -p %t.d/some/dir
|
|
|
|
// RUN: %clang -### -S -fprofile-use=%t.d/some/dir %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE-DIR %s
|
|
|
|
// RUN: %clang -### -S -fprofile-instr-use=/tmp/somefile.prof %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE-FILE %s
|
2016-03-03 04:59:36 +08:00
|
|
|
// CHECK-PROFILE-USE: "-fprofile-instrument-use-path=default.profdata"
|
|
|
|
// CHECK-PROFILE-USE-DIR: "-fprofile-instrument-use-path={{.*}}.d/some/dir{{/|\\\\}}default.profdata"
|
|
|
|
// CHECK-PROFILE-USE-FILE: "-fprofile-instrument-use-path=/tmp/somefile.prof"
|
2015-07-10 01:23:53 +08:00
|
|
|
|
2012-12-12 01:12:28 +08:00
|
|
|
// RUN: %clang -### -S -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -fno-vectorize -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -fvectorize -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s
|
2012-12-12 01:46:33 +08:00
|
|
|
// RUN: %clang -### -S -ftree-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
|
2012-12-19 07:08:58 +08:00
|
|
|
// RUN: %clang -### -S -fno-tree-vectorize -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -fno-tree-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s
|
2012-12-12 01:46:33 +08:00
|
|
|
// RUN: %clang -### -S -ftree-vectorize -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s
|
2013-08-13 23:46:23 +08:00
|
|
|
// RUN: %clang -### -S -O %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -fno-vectorize -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -O1 -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -Ofast %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -Oz %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s
|
2012-12-12 01:12:28 +08:00
|
|
|
// CHECK-VECTORIZE: "-vectorize-loops"
|
|
|
|
// CHECK-NO-VECTORIZE-NOT: "-vectorize-loops"
|
2012-12-12 03:59:32 +08:00
|
|
|
|
|
|
|
// RUN: %clang -### -S -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -fno-slp-vectorize -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -fslp-vectorize -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -ftree-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
|
2012-12-19 07:08:58 +08:00
|
|
|
// RUN: %clang -### -S -fno-tree-slp-vectorize -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -fno-tree-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s
|
2012-12-12 03:59:32 +08:00
|
|
|
// RUN: %clang -### -S -ftree-slp-vectorize -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s
|
2014-04-29 03:30:57 +08:00
|
|
|
// RUN: %clang -### -S -O %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
|
2014-05-03 02:41:57 +08:00
|
|
|
// RUN: %clang -### -S -Oz %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
|
2014-04-29 03:30:57 +08:00
|
|
|
// RUN: %clang -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -fno-slp-vectorize -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -O1 -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -Ofast %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s
|
|
|
|
// RUN: %clang -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s
|
2013-04-15 12:57:18 +08:00
|
|
|
// CHECK-SLP-VECTORIZE: "-vectorize-slp"
|
|
|
|
// CHECK-NO-SLP-VECTORIZE-NOT: "-vectorize-slp"
|
2013-02-07 02:15:40 +08:00
|
|
|
|
2013-04-15 13:38:41 +08:00
|
|
|
// RUN: %clang -### -S -fslp-vectorize-aggressive %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE-AGG %s
|
|
|
|
// RUN: %clang -### -S -fno-slp-vectorize-aggressive -fslp-vectorize-aggressive %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE-AGG %s
|
|
|
|
// RUN: %clang -### -S -fno-slp-vectorize-aggressive %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE-AGG %s
|
|
|
|
// RUN: %clang -### -S -fslp-vectorize-aggressive -fno-slp-vectorize-aggressive %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE-AGG %s
|
|
|
|
// CHECK-SLP-VECTORIZE-AGG: "-vectorize-slp-aggressive"
|
|
|
|
// CHECK-NO-SLP-VECTORIZE-AGG-NOT: "-vectorize-slp-aggressive"
|
|
|
|
|
2013-02-07 02:15:40 +08:00
|
|
|
// RUN: %clang -### -S -fextended-identifiers %s 2>&1 | FileCheck -check-prefix=CHECK-EXTENDED-IDENTIFIERS %s
|
|
|
|
// RUN: %clang -### -S -fno-extended-identifiers %s 2>&1 | FileCheck -check-prefix=CHECK-NO-EXTENDED-IDENTIFIERS %s
|
|
|
|
// CHECK-EXTENDED-IDENTIFIERS: "-cc1"
|
|
|
|
// CHECK-EXTENDED-IDENTIFIERS-NOT: "-fextended-identifiers"
|
|
|
|
// CHECK-NO-EXTENDED-IDENTIFIERS: error: unsupported option '-fno-extended-identifiers'
|
2013-08-01 07:39:13 +08:00
|
|
|
|
|
|
|
// RUN: %clang -### -S -fno-pascal-strings -mpascal-strings %s 2>&1 | FileCheck -check-prefix=CHECK-M-PASCAL-STRINGS %s
|
|
|
|
// CHECK-M-PASCAL-STRINGS: "-fpascal-strings"
|
|
|
|
|
|
|
|
// RUN: %clang -### -S -fpascal-strings -mno-pascal-strings %s 2>&1 | FileCheck -check-prefix=CHECK-NO-M-PASCAL-STRINGS %s
|
|
|
|
// CHECK-NO-M-PASCAL-STRINGS-NOT: "-fpascal-strings"
|
2013-08-24 05:49:00 +08:00
|
|
|
|
|
|
|
// RUN: %clang -### -S -O4 %s 2>&1 | FileCheck -check-prefix=CHECK-MAX-O %s
|
2013-08-28 00:58:15 +08:00
|
|
|
// CHECK-MAX-O: warning: -O4 is equivalent to -O3
|
2013-08-24 05:49:00 +08:00
|
|
|
// CHECK-MAX-O: -O3
|
2013-09-26 21:10:14 +08:00
|
|
|
|
2013-11-19 05:58:33 +08:00
|
|
|
// RUN: %clang -S -O20 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-O %s
|
2014-07-15 03:16:22 +08:00
|
|
|
// CHECK-INVALID-O: warning: optimization level '-O20' is not supported; using '-O3' instead
|
2013-11-18 21:23:07 +08:00
|
|
|
|
2014-07-02 01:24:27 +08:00
|
|
|
// RUN: %clang -### -S -finput-charset=iso-8859-1 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-CHARSET %s
|
|
|
|
// CHECK-INVALID-CHARSET: error: invalid value 'iso-8859-1' in '-finput-charset=iso-8859-1'
|
|
|
|
|
2014-08-12 02:09:03 +08:00
|
|
|
// RUN: %clang -### -S -fexec-charset=iso-8859-1 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-INPUT-CHARSET %s
|
|
|
|
// CHECK-INVALID-INPUT-CHARSET: error: invalid value 'iso-8859-1' in '-fexec-charset=iso-8859-1'
|
|
|
|
|
2013-09-26 21:10:14 +08:00
|
|
|
// Test that we don't error on these.
|
2013-09-27 00:45:27 +08:00
|
|
|
// RUN: %clang -### -S -Werror \
|
2013-09-26 21:10:14 +08:00
|
|
|
// RUN: -falign-functions -falign-functions=2 -fno-align-functions \
|
|
|
|
// RUN: -fasynchronous-unwind-tables -fno-asynchronous-unwind-tables \
|
|
|
|
// RUN: -fbuiltin -fno-builtin \
|
2013-10-24 17:17:35 +08:00
|
|
|
// RUN: -fdiagnostics-show-location=once \
|
2013-09-26 21:10:14 +08:00
|
|
|
// RUN: -ffloat-store -fno-float-store \
|
|
|
|
// RUN: -feliminate-unused-debug-types -fno-eliminate-unused-debug-types \
|
|
|
|
// RUN: -fgcse -fno-gcse \
|
|
|
|
// RUN: -fident -fno-ident \
|
2013-10-24 17:21:37 +08:00
|
|
|
// RUN: -fimplicit-templates -fno-implicit-templates \
|
2014-07-02 01:24:27 +08:00
|
|
|
// RUN: -finput-charset=UTF-8 \
|
2014-08-12 02:09:03 +08:00
|
|
|
// RUN: -fexec-charset=UTF-8 \
|
2013-09-26 21:10:14 +08:00
|
|
|
// RUN: -fivopts -fno-ivopts \
|
|
|
|
// RUN: -fnon-call-exceptions -fno-non-call-exceptions \
|
|
|
|
// RUN: -fpermissive -fno-permissive \
|
2014-07-04 16:59:41 +08:00
|
|
|
// RUN: -fdefer-pop -fno-defer-pop \
|
2013-09-26 21:10:14 +08:00
|
|
|
// RUN: -fprefetch-loop-arrays -fno-prefetch-loop-arrays \
|
|
|
|
// RUN: -fprofile-correction -fno-profile-correction \
|
|
|
|
// RUN: -fprofile-values -fno-profile-values \
|
|
|
|
// RUN: -frounding-math -fno-rounding-math \
|
|
|
|
// RUN: -fsee -fno-see \
|
|
|
|
// RUN: -ftracer -fno-tracer \
|
|
|
|
// RUN: -funroll-all-loops -fno-unroll-all-loops \
|
2013-10-04 03:45:55 +08:00
|
|
|
// RUN: -fuse-ld=gold \
|
2013-09-27 00:15:40 +08:00
|
|
|
// RUN: -fno-builtin-foobar \
|
2013-09-27 00:45:27 +08:00
|
|
|
// RUN: -fno-builtin-strcat -fno-builtin-strcpy \
|
2013-09-27 01:03:34 +08:00
|
|
|
// RUN: -fno-var-tracking \
|
2013-09-27 13:06:31 +08:00
|
|
|
// RUN: -fno-unsigned-char \
|
|
|
|
// RUN: -fno-signed-char \
|
2013-10-22 02:49:56 +08:00
|
|
|
// RUN: -fstrength-reduce -fno-strength-reduce \
|
2014-07-11 19:43:57 +08:00
|
|
|
// RUN: -finline-limit=1000 \
|
|
|
|
// RUN: -finline-limit \
|
2014-08-06 02:13:48 +08:00
|
|
|
// RUN: -flto=1 \
|
|
|
|
// RUN: -falign-labels \
|
|
|
|
// RUN: -falign-labels=100 \
|
|
|
|
// RUN: -falign-loops \
|
|
|
|
// RUN: -falign-loops=100 \
|
|
|
|
// RUN: -falign-jumps \
|
|
|
|
// RUN: -falign-jumps=100 \
|
|
|
|
// RUN: -fexcess-precision=100 \
|
2014-08-06 07:43:21 +08:00
|
|
|
// RUN: -fbranch-count-reg \
|
2014-08-06 02:13:48 +08:00
|
|
|
// RUN: -fcaller-saves \
|
|
|
|
// RUN: -fno-default-inline -fdefault-inline \
|
|
|
|
// RUN: -fgcse-after-reload \
|
|
|
|
// RUN: -fgcse-las \
|
|
|
|
// RUN: -fgcse-sm \
|
|
|
|
// RUN: -fipa-cp \
|
|
|
|
// RUN: -finline-functions-called-once \
|
|
|
|
// RUN: -fmodulo-sched \
|
|
|
|
// RUN: -fmodulo-sched-allow-regmoves \
|
|
|
|
// RUN: -fpeel-loops \
|
|
|
|
// RUN: -frename-registers \
|
|
|
|
// RUN: -fschedule-insns2 \
|
|
|
|
// RUN: -fsingle-precision-constant \
|
|
|
|
// RUN: -ftree_loop_im \
|
|
|
|
// RUN: -ftree_loop_ivcanon \
|
|
|
|
// RUN: -ftree_loop_linear \
|
|
|
|
// RUN: -funsafe-loop-optimizations \
|
|
|
|
// RUN: -fuse-linker-plugin \
|
|
|
|
// RUN: -fvect-cost-model \
|
|
|
|
// RUN: -fvariable-expansion-in-unroller \
|
|
|
|
// RUN: -fweb \
|
|
|
|
// RUN: -fwhole-program \
|
|
|
|
// RUN: -fno-tree-dce -ftree-dce \
|
|
|
|
// RUN: -fno-tree-ter -ftree-ter \
|
|
|
|
// RUN: -fno-tree-vrp -ftree-vrp \
|
|
|
|
// RUN: -fno-delete-null-pointer-checks -fdelete-null-pointer-checks \
|
|
|
|
// RUN: -fno-inline-small-functions -finline-small-functions \
|
|
|
|
// RUN: -fno-fat-lto-objects -ffat-lto-objects \
|
|
|
|
// RUN: -fno-merge-constants -fmerge-constants \
|
|
|
|
// RUN: -fno-caller-saves -fcaller-saves \
|
|
|
|
// RUN: -fno-reorder-blocks -freorder-blocks \
|
|
|
|
// RUN: -fno-schedule-insns2 -fschedule-insns2 \
|
2014-08-06 02:21:20 +08:00
|
|
|
// RUN: -fno-stack-check \
|
|
|
|
// RUN: -fno-check-new -fcheck-new \
|
|
|
|
// RUN: -ffriend-injection \
|
|
|
|
// RUN: -fno-implement-inlines -fimplement-inlines \
|
|
|
|
// RUN: -fstack-check \
|
2014-08-06 07:43:21 +08:00
|
|
|
// RUN: -fforce-addr \
|
2014-08-06 02:21:20 +08:00
|
|
|
// RUN: -malign-functions=100 \
|
|
|
|
// RUN: -malign-loops=100 \
|
|
|
|
// RUN: -malign-jumps=100 \
|
2013-10-04 03:34:34 +08:00
|
|
|
// RUN: %s 2>&1 | FileCheck --check-prefix=IGNORE %s
|
|
|
|
// IGNORE-NOT: error: unknown argument
|
2014-02-25 02:43:28 +08:00
|
|
|
|
2014-07-11 19:43:57 +08:00
|
|
|
// Test that the warning is displayed on these.
|
2014-07-18 19:38:58 +08:00
|
|
|
// RUN: %clang -### \
|
|
|
|
// RUN: -finline-limit=1000 \
|
|
|
|
// RUN: -finline-limit \
|
|
|
|
// RUN: -fexpensive-optimizations \
|
|
|
|
// RUN: -fno-expensive-optimizations \
|
|
|
|
// RUN: -fno-defer-pop \
|
2014-08-27 13:12:35 +08:00
|
|
|
// RUN: -fkeep-inline-functions \
|
2014-07-18 19:38:58 +08:00
|
|
|
// RUN: -fno-keep-inline-functions \
|
|
|
|
// RUN: -freorder-blocks \
|
|
|
|
// RUN: -falign-functions \
|
|
|
|
// RUN: -falign-functions=1 \
|
|
|
|
// RUN: -ffloat-store \
|
|
|
|
// RUN: -fgcse \
|
|
|
|
// RUN: -fivopts \
|
|
|
|
// RUN: -fprefetch-loop-arrays \
|
|
|
|
// RUN: -fprofile-correction \
|
|
|
|
// RUN: -fprofile-values \
|
|
|
|
// RUN: -frounding-math \
|
|
|
|
// RUN: -fschedule-insns \
|
|
|
|
// RUN: -fsignaling-nans \
|
|
|
|
// RUN: -fstrength-reduce \
|
|
|
|
// RUN: -ftracer \
|
|
|
|
// RUN: -funroll-all-loops \
|
|
|
|
// RUN: -funswitch-loops \
|
2014-08-06 02:13:48 +08:00
|
|
|
// RUN: -flto=1 \
|
|
|
|
// RUN: -falign-labels \
|
|
|
|
// RUN: -falign-labels=100 \
|
|
|
|
// RUN: -falign-loops \
|
|
|
|
// RUN: -falign-loops=100 \
|
|
|
|
// RUN: -falign-jumps \
|
|
|
|
// RUN: -falign-jumps=100 \
|
|
|
|
// RUN: -fexcess-precision=100 \
|
2014-08-06 07:43:21 +08:00
|
|
|
// RUN: -fbranch-count-reg \
|
2014-08-06 02:13:48 +08:00
|
|
|
// RUN: -fcaller-saves \
|
|
|
|
// RUN: -fno-default-inline \
|
|
|
|
// RUN: -fgcse-after-reload \
|
|
|
|
// RUN: -fgcse-las \
|
|
|
|
// RUN: -fgcse-sm \
|
|
|
|
// RUN: -fipa-cp \
|
|
|
|
// RUN: -finline-functions-called-once \
|
|
|
|
// RUN: -fmodulo-sched \
|
|
|
|
// RUN: -fmodulo-sched-allow-regmoves \
|
|
|
|
// RUN: -fpeel-loops \
|
|
|
|
// RUN: -frename-registers \
|
|
|
|
// RUN: -fschedule-insns2 \
|
|
|
|
// RUN: -fsingle-precision-constant \
|
|
|
|
// RUN: -ftree_loop_im \
|
|
|
|
// RUN: -ftree_loop_ivcanon \
|
|
|
|
// RUN: -ftree_loop_linear \
|
|
|
|
// RUN: -funsafe-loop-optimizations \
|
|
|
|
// RUN: -fuse-linker-plugin \
|
|
|
|
// RUN: -fvect-cost-model \
|
|
|
|
// RUN: -fvariable-expansion-in-unroller \
|
|
|
|
// RUN: -fweb \
|
|
|
|
// RUN: -fwhole-program \
|
|
|
|
// RUN: -fcaller-saves \
|
|
|
|
// RUN: -freorder-blocks \
|
|
|
|
// RUN: -fdelete-null-pointer-checks \
|
|
|
|
// RUN: -ffat-lto-objects \
|
|
|
|
// RUN: -fmerge-constants \
|
|
|
|
// RUN: -finline-small-functions \
|
|
|
|
// RUN: -ftree-dce \
|
|
|
|
// RUN: -ftree-ter \
|
|
|
|
// RUN: -ftree-vrp \
|
2014-08-27 03:57:01 +08:00
|
|
|
// RUN: -fno-devirtualize \
|
|
|
|
// RUN: -fno-devirtualize-speculatively \
|
2014-07-18 19:38:58 +08:00
|
|
|
// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING %s
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-finline-limit=1000' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-finline-limit' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fexpensive-optimizations' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fno-expensive-optimizations' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fno-defer-pop' is not supported
|
2014-08-27 13:12:35 +08:00
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fkeep-inline-functions' is not supported
|
2014-07-18 19:38:58 +08:00
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fno-keep-inline-functions' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-freorder-blocks' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-falign-functions' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-falign-functions=1' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-ffloat-store' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fgcse' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fivopts' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fprefetch-loop-arrays' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fprofile-correction' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fprofile-values' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-frounding-math' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fschedule-insns' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fsignaling-nans' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fstrength-reduce' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-ftracer' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-funroll-all-loops' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-funswitch-loops' is not supported
|
2015-10-16 04:35:53 +08:00
|
|
|
// CHECK-WARNING-DAG: unsupported argument '1' to option 'flto='
|
2014-08-06 02:13:48 +08:00
|
|
|
// CHECK-WARNING-DAG: optimization flag '-falign-labels' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-falign-labels=100' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-falign-loops' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-falign-loops=100' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-falign-jumps' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-falign-jumps=100' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fexcess-precision=100' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fbranch-count-reg' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fcaller-saves' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fno-default-inline' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fgcse-after-reload' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fgcse-las' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fgcse-sm' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fipa-cp' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-finline-functions-called-once' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fmodulo-sched' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fmodulo-sched-allow-regmoves' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fpeel-loops' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-frename-registers' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fschedule-insns2' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fsingle-precision-constant' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-ftree_loop_im' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-ftree_loop_ivcanon' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-ftree_loop_linear' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-funsafe-loop-optimizations' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fuse-linker-plugin' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fvect-cost-model' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fvariable-expansion-in-unroller' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fweb' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fwhole-program' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fcaller-saves' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-freorder-blocks' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fdelete-null-pointer-checks' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-ffat-lto-objects' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fmerge-constants' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-finline-small-functions' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-ftree-dce' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-ftree-ter' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-ftree-vrp' is not supported
|
2014-08-27 03:57:01 +08:00
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fno-devirtualize' is not supported
|
|
|
|
// CHECK-WARNING-DAG: optimization flag '-fno-devirtualize-speculatively' is not supported
|
2014-07-11 19:43:57 +08:00
|
|
|
|
2014-07-12 01:23:13 +08:00
|
|
|
// Test that we mute the warning on these
|
2014-07-15 02:11:38 +08:00
|
|
|
// RUN: %clang -### -finline-limit=1000 -Wno-invalid-command-line-argument \
|
2014-07-12 01:23:13 +08:00
|
|
|
// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING1 %s
|
2014-07-15 02:11:38 +08:00
|
|
|
// RUN: %clang -### -finline-limit -Wno-invalid-command-line-argument \
|
2014-07-12 01:23:13 +08:00
|
|
|
// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING2 %s
|
2014-07-24 07:29:01 +08:00
|
|
|
// RUN: %clang -### -finline-limit \
|
|
|
|
// RUN: -Winvalid-command-line-argument -Wno-ignored-optimization-argument \
|
|
|
|
// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING2 %s
|
2014-07-15 02:11:38 +08:00
|
|
|
// CHECK-NO-WARNING1-NOT: optimization flag '-finline-limit=1000' is not supported
|
|
|
|
// CHECK-NO-WARNING2-NOT: optimization flag '-finline-limit' is not supported
|
2014-07-12 01:23:13 +08:00
|
|
|
|
2015-08-06 02:03:47 +08:00
|
|
|
// Test that an ignored optimization argument only prints 1 warning,
|
|
|
|
// not both a warning about not claiming the arg, *and* about not supporting
|
|
|
|
// the arg; and that adding -Wno-ignored-optimization silences the warning.
|
|
|
|
//
|
|
|
|
// RUN: %clang -### -fprofile-correction %s 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-NO-WARNING3 %s
|
|
|
|
// CHECK-NO-WARNING3: optimization flag '-fprofile-correction' is not supported
|
|
|
|
// CHECK-NO-WARNING3-NOT: argument unused
|
|
|
|
// RUN: %clang -### -fprofile-correction -Wno-ignored-optimization-argument %s 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-NO-WARNING4 %s
|
|
|
|
// CHECK-NO-WARNING4-NOT: not supported
|
|
|
|
// CHECK-NO-WARNING4-NOT: argument unused
|
|
|
|
|
2015-05-24 02:48:37 +08:00
|
|
|
// RUN: %clang -### -S -fsigned-char %s 2>&1 | FileCheck -check-prefix=CHAR-SIGN1 %s
|
|
|
|
// CHAR-SIGN1-NOT: -fno-signed-char
|
|
|
|
|
|
|
|
// RUN: %clang -### -S -funsigned-char %s 2>&1 | FileCheck -check-prefix=CHAR-SIGN2 %s
|
|
|
|
// CHAR-SIGN2: -fno-signed-char
|
|
|
|
|
|
|
|
// RUN: %clang -### -S -fno-signed-char %s 2>&1 | FileCheck -check-prefix=CHAR-SIGN3 %s
|
|
|
|
// CHAR-SIGN3: -fno-signed-char
|
|
|
|
|
|
|
|
// RUN: %clang -### -S -fno-unsigned-char %s 2>&1 | FileCheck -check-prefix=CHAR-SIGN4 %s
|
|
|
|
// CHAR-SIGN4-NOT: -fno-signed-char
|
2014-07-12 01:23:13 +08:00
|
|
|
|
2015-02-12 11:37:55 +08:00
|
|
|
// RUN: %clang -### -fshort-wchar -fno-short-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR1 -check-prefix=DELIMITERS %s
|
|
|
|
// RUN: %clang -### -fno-short-wchar -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR2 -check-prefix=DELIMITERS %s
|
|
|
|
// Make sure we don't match the -NOT lines with the linker invocation.
|
|
|
|
// Delimiters match the start of the cc1 and the start of the linker lines
|
|
|
|
// DELIMITERS: {{^ *"}}
|
2014-02-25 02:43:28 +08:00
|
|
|
// CHECK-WCHAR1: -fno-short-wchar
|
|
|
|
// CHECK-WCHAR1-NOT: -fshort-wchar
|
|
|
|
// CHECK-WCHAR2: -fshort-wchar
|
|
|
|
// CHECK-WCHAR2-NOT: -fno-short-wchar
|
2015-02-12 11:37:55 +08:00
|
|
|
// DELIMITERS: {{^ *"}}
|