llvm-project/clang/test
Adam Nemet 049a31d53d Use FPContractModeKind universally
FPContractModeKind is the codegen option flag which is already ternary (off,
on, fast).  This makes it universally the type for the contractable info
across the front-end:

* In FPOptions (i.e. in the Sema + in the expression nodes).
* In LangOpts::DefaultFPContractMode which is the option that initializes
FPOptions in the Sema.

Another way to look at this change is that before fp-contractable on/off were
the only states handled to the front-end:
 * For "on", FMA folding was performed by  the front-end
 * For "fast", we simply forwarded the flag to TargetOptions to handle it in
 LLVM

Now off/on/fast are all exposed because for fast we will generate
fast-math-flags during CodeGen.

This is toward moving fp-contraction=fast from an LLVM TargetOption to a
FastMathFlag in order to fix PR25721.

---
This is a recommit of r299027 with an adjustment to the test
CodeGenCUDA/fp-contract.cu.  The test assumed that even
though -ffp-contract=on is passed FE-based folding of FMA won't happen.

This is obviously wrong since the user is asking for this explicitly with the
option.  CUDA is different that -ffp-contract=fast is on by default.

The test used to "work" because contract=fast and contract=on were maintained
separately and we didn't fold in the FE because contract=fast was on due to
the target-default.  This patch consolidates the contract=on/fast/off state
into a ternary state hence the change in behavior.
---

Differential Revision: https://reviews.llvm.org/D31167

llvm-svn: 299033
2017-03-29 21:54:24 +00:00
..
ARCMT [test] Port clang tests to canonicalized booleans 2017-01-25 13:11:45 +00:00
ASTMerge [ASTImporter] Import fix of GCCAsmStmts w/ missing symbolic operands 2017-03-13 15:32:24 +00:00
Analysis [analyzer] Fix symbolication for unknown unary increment/decrement results. 2017-03-28 15:57:12 +00:00
CXX Correct class-template deprecation behavior-REDUX 2017-03-23 18:51:54 +00:00
CodeCompletion [libclang] Fix crash in member access code completion with implicit base 2017-03-28 07:22:21 +00:00
CodeGen Revert r298491 and r298494 which changed Clang's handling of 'nonnull' 2017-03-24 09:11:57 +00:00
CodeGenCUDA Use FPContractModeKind universally 2017-03-29 21:54:24 +00:00
CodeGenCXX IRGen: Do not set dllexport on declarations. 2017-03-21 02:02:41 +00:00
CodeGenCoroutines [coroutines] Handle get_return_object_on_allocation_failure 2017-03-27 23:36:59 +00:00
CodeGenObjC [CodeGen] Emit a CoreFoundation link guard when @available is used 2017-03-23 11:14:27 +00:00
CodeGenObjCXX [Objective-C] C++ Classes with __weak Members non-POD Types when using -fobjc-weak 2017-03-29 17:31:42 +00:00
CodeGenOpenCL [OpenCL] Extended mapping of parcing CodeGen arguments 2017-03-27 10:38:01 +00:00
Coverage Handle StaticAssertDecl in DeclContextPrinter 2017-01-03 12:16:02 +00:00
CoverageMapping Suppress uninteresting warnings in test/CoverageMapping, NFC. 2017-02-25 07:05:41 +00:00
Driver [ARM] Add a driver option for +no-neg-immediates 2017-03-27 15:34:52 +00:00
FixIt [Sema] Improve the error diagnostic for dot destructor calls on pointer objects 2017-01-20 15:38:58 +00:00
Format clang/test/Format/inplace.cpp: Avoid using wildcard. 2017-02-28 10:05:56 +00:00
Frontend Add -iframeworkwithsysroot compiler option 2017-03-13 11:17:41 +00:00
Headers Remove the -faltivec alias option and replace it with -maltivec everywhere. 2017-03-21 22:06:18 +00:00
Import Testbed and skeleton of a new expression parser 2016-12-22 20:03:14 +00:00
Index [index] When indexing system headers make sure to report important reference relations 2017-03-23 16:34:47 +00:00
Integration
Layout Print nested name specifiers for typedefs and type aliases 2017-03-10 15:04:58 +00:00
Lexer [c++1z] Mark constexpr lambdas as done on status page and start advertising 2017-02-21 23:58:29 +00:00
Misc Add [[clang::suppress(rule, ...)]] attribute 2017-03-27 19:45:24 +00:00
Modules Revert r298742 "[ODRHash] Add error messages for mismatched parameters in methods." 2017-03-26 21:39:16 +00:00
OpenMP [test] Unbreak OpenMP/linking.c with arch-specific libdir 2017-03-08 09:07:33 +00:00
PCH Unbreak windows bot. 2017-03-29 17:58:41 +00:00
Parser Reapplied r298976 [OpenCL] Added parsing for OpenCL vector types. 2017-03-29 12:09:39 +00:00
Preprocessor Default enable the rtm feature only on skylake and later for now because Intel disabled the feature on some haswell and broadwell processors: 2017-03-28 23:03:19 +00:00
Profile Weaken test/Profile/c-ternary.c 2017-02-25 07:21:23 +00:00
Rewriter [test] Port clang tests to canonicalized booleans 2017-01-25 13:11:45 +00:00
Sema Correct class-template deprecation behavior-REDUX 2017-03-23 18:51:54 +00:00
SemaCUDA [CUDA] Let NVPTX inherit the host's calling conventions. 2017-01-05 16:53:38 +00:00
SemaCXX [coroutines] Handle get_return_object_on_allocation_failure 2017-03-27 23:36:59 +00:00
SemaObjC [Objective-C] Fix "weak-unavailable" warning with -fobjc-weak 2017-03-29 18:09:02 +00:00
SemaObjCXX [Objective-C] Miscellaneous -fobjc-weak Fixes 2017-03-29 18:16:38 +00:00
SemaOpenCL [OpenCL] Added diagnostic for checking length of vector 2017-03-21 13:20:57 +00:00
SemaTemplate Print nested name specifiers for typedefs and type aliases 2017-03-10 15:04:58 +00:00
TableGen
Tooling [test] Port clang tests to canonicalized booleans 2017-01-25 13:11:45 +00:00
Unit [test] Extend llvm_shlib_dir fix to unittests 2016-12-15 20:31:08 +00:00
VFS Don't diagnose non-modular includes when we are not compiling a module. 2016-08-26 17:16:46 +00:00
.clang-format
CMakeLists.txt Re-apply r292662, "IRGen: Start using the WriteThinLTOBitcode pass." 2017-01-26 23:51:50 +00:00
TestRunner.sh
cxx-sections.data
lit.cfg [Driver] Add flag to request arch-specific-subdir in -rpath 2017-03-14 16:58:07 +00:00
lit.site.cfg.in [test] Port clang tests to canonicalized booleans 2017-01-25 13:11:45 +00:00
make_test_dirs.pl