llvm-project/llvm/lib
Sanjay Patel e5606b4fa5 [ConstantFold] fp_binop AnyConstant, undef --> NaN
With the updated LangRef ( D44216 / rL327138 ) in place, we can proceed with more constant folding.

I'm intentionally taking the conservative path here: no matter what the constant or the FMF, we can 
always fold to NaN. This is because the undef operand can be chosen as NaN, and in our simplified 
default FP env, nothing else happens - NaN just propagates to the result. If we find some way/need 
to propagate undef instead, that can be added subsequently.

The tests show that we always choose the same quiet NaN constant (0x7FF8000000000000 in IR text). 
There were suggestions to improve that with a 'NaN' string token or not always print a 64-bit hex 
value, but those are independent changes. We might also consider setting/propagating the payload of 
NaN constants as an enhancement.

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

llvm-svn: 327208
2018-03-10 15:56:25 +00:00
..
Analysis [NFC] Consolidate six getPointerOperand() utility functions into one place 2018-03-09 21:05:58 +00:00
AsmParser Make the LLParser accept call instructions of variables in the program AS 2018-02-27 11:15:11 +00:00
BinaryFormat [DWARF v5] Support for verbose dumping of .debug_rnglist entries 2018-03-08 20:52:35 +00:00
Bitcode [DebugInfo] Support DWARF v5 source code embedding extension 2018-02-23 23:01:06 +00:00
CodeGen Revert: r327172 "Correct load-op-store cycle detection analysis" 2018-03-10 02:16:15 +00:00
DebugInfo [DebugInfo/AccelTable] Fix inconsistency in getDIEOffset implementations 2018-03-09 11:58:59 +00:00
Demangle Silence a bunch of implicit fallthrough warnings 2017-12-19 22:05:25 +00:00
ExecutionEngine [RuntimeDyld][MachO] Fix assertion in encodeAddend, add missing directive to 2018-03-01 01:44:33 +00:00
FuzzMutate [llvm-opt-fuzzer] Add another pack of passes for continuous fuzzing 2018-02-19 11:57:07 +00:00
Fuzzer [libFuzzer] Delete llvm/lib/Fuzzer 2017-10-16 20:48:19 +00:00
IR [ConstantFold] fp_binop AnyConstant, undef --> NaN 2018-03-10 15:56:25 +00:00
IRReader LLParser: add an argument for overriding data layout and do not check alloca addr space 2018-01-30 22:32:39 +00:00
LTO Revert "[LTO] Support filtering by hotness threshold" 2018-03-08 01:13:10 +00:00
LineEditor
Linker [ThinLTO] Revert r325320: Import global variables 2018-03-02 23:40:08 +00:00
MC Delay creating an alias for @@@. 2018-03-09 18:42:25 +00:00
Object Delay creating an alias for @@@. 2018-03-09 18:42:25 +00:00
ObjectYAML Reland "[DebugInfo] Support DWARF expressions in eh_frame" 2018-03-08 00:46:53 +00:00
Option [Bash-autocompletion] Pass all flags in shell command-line to Clang 2018-03-05 08:54:20 +00:00
Passes Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
ProfileData [SampleFDO] Extend SampleProfReader to handle demangled names. 2018-03-07 16:45:33 +00:00
Support [Support] Move syntax highlighting into support 2018-03-09 09:56:24 +00:00
TableGen TableGen: Remove space at EOL in TGLexer.{h,cpp} 2018-03-09 18:32:04 +00:00
Target [X86] Add a missing EVEX instruction to EmitAnyX86InstComments. 2018-03-10 06:05:13 +00:00
Testing Force #define GTEST_LANG_CXX11. 2017-10-27 21:12:28 +00:00
ToolDrivers [COFF] Keep the underscore on exported decorated stdcall functions in MSVC mode 2018-01-20 11:44:32 +00:00
Transforms [PartialInlining] Use isInlineViable to detect constructs preventing inlining. 2018-03-10 14:53:44 +00:00
WindowsManifest Fix bug 34608 by moving private header out of public header. 2017-09-14 23:01:13 +00:00
XRay [XRay] clarify error messages when parsing broken traces 2018-01-30 13:41:34 +00:00
CMakeLists.txt
LLVMBuild.txt