1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/lib/IR
Sanjay Patel 2052a093cc [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
..
AsmWriter.cpp [DebugInfo] Support DWARF v5 source code embedding extension 2018-02-23 23:01:06 +00:00
AttributeImpl.h
Attributes.cpp [Attributes] Fix crash when attempting to remove alignment from an attribute list/set 2018-01-17 19:15:21 +00:00
AttributesCompatFunc.td
AutoUpgrade.cpp [X86] Add 512-bit unmasked pmulhrsw/pmulhw/pmulhuw intrinsics. Remove and auto upgrade 128/256/512 bit masked pmulhrsw/pmulhw/pmulhuw intrinsics. 2018-02-20 07:28:14 +00:00
BasicBlock.cpp IR: Fix BasicBlock::phis for empty blocks 2017-12-29 19:25:53 +00:00
CMakeLists.txt
Comdat.cpp
ConstantFold.cpp [ConstantFold] fp_binop AnyConstant, undef --> NaN 2018-03-10 15:56:25 +00:00
ConstantFold.h
ConstantRange.cpp
Constants.cpp [PatternMatch, InstSimplify] fix m_NaN to work with vector constants and use it 2018-03-02 18:36:08 +00:00
ConstantsContext.h
Core.cpp [LLVM-C] Add Accessors For A Module's Source File Name 2018-01-30 21:34:29 +00:00
DataLayout.cpp Add default address space for functions to the data layout (1/3) 2018-02-19 09:56:22 +00:00
DebugInfo.cpp
DebugInfoMetadata.cpp [DebugInfo] Support DWARF v5 source code embedding extension 2018-02-23 23:01:06 +00:00
DebugLoc.cpp
DiagnosticHandler.cpp
DiagnosticInfo.cpp This change add's optimization remark in LoopVersioning LICM pass. 2018-01-23 09:47:28 +00:00
DiagnosticPrinter.cpp
DIBuilder.cpp [DebugInfo] Support DWARF v5 source code embedding extension 2018-02-23 23:01:06 +00:00
Dominators.cpp [Dominators] Remove verifyDomTree and add some verifying for Post Dom Trees 2018-02-28 11:00:08 +00:00
Function.cpp [MIRParser] Accept overloaded intrinsic names w/o type suffixes 2018-02-28 23:51:49 +00:00
Globals.cpp
GVMaterializer.cpp
InlineAsm.cpp
Instruction.cpp [IPSCCP] Remove calls without side effects 2018-01-09 21:58:46 +00:00
Instructions.cpp [InstCombine] Allow fptrunc (fpext X)) to be reduced to a single fpext/ftrunc 2018-03-02 18:16:51 +00:00
IntrinsicInst.cpp
IRBuilder.cpp [InstCombine] allow fmul-sqrt folds with less than full -ffast-math 2018-02-23 21:16:12 +00:00
IRPrintingPasses.cpp
LegacyPassManager.cpp
LLVMBuild.txt
LLVMContext.cpp
LLVMContextImpl.cpp
LLVMContextImpl.h [DebugInfo] Support DWARF v5 source code embedding extension 2018-02-23 23:01:06 +00:00
Mangler.cpp CodeGen: handle llvm.used properly for COFF 2018-01-20 00:28:02 +00:00
MDBuilder.cpp [IR] Fix creating mutable versions of TBAA access tags 2018-02-13 14:44:25 +00:00
Metadata.cpp [DeadArgumentElimination] Preserve llvm.dbg.values's first argument 2018-01-30 16:42:04 +00:00
MetadataImpl.h
Module.cpp Intrinsics calls should avoid the PLT when "RtLibUseGOT" metadata is present. 2018-02-23 21:32:06 +00:00
ModuleSummaryIndex.cpp [ThinLTO] Add GraphTraits for FunctionSummaries 2018-02-19 15:14:50 +00:00
Operator.cpp Adding a width of the GEP index to the Data Layout. 2018-02-14 06:58:08 +00:00
OptBisect.cpp
Pass.cpp
PassManager.cpp
PassRegistry.cpp
ProfileSummary.cpp
SafepointIRVerifier.cpp [SafepointIRVerifier] Allow non-dereferencing uses of unrelocated or poisoned PHI nodes 2017-12-25 09:35:10 +00:00
Statepoint.cpp
SymbolTableListTraitsImpl.h
Type.cpp
TypeFinder.cpp Use ranged for loops in TypeFinder.cpp, NFC 2018-02-08 18:02:27 +00:00
Use.cpp
User.cpp
Value.cpp Adding a width of the GEP index to the Data Layout. 2018-02-14 06:58:08 +00:00
ValueSymbolTable.cpp
ValueTypes.cpp [WebAssembly] Add EVT::getEVTString() for except_ref type 2018-03-09 23:29:06 +00:00
Verifier.cpp Use branch funnels for virtual calls when retpoline mitigation is enabled. 2018-03-09 19:11:44 +00:00