llvm-6502/include/llvm
Arnold Schwaighofer e79d92c592 PatternMatch: Matcher for (un)ordered floating point min/max
Add support for matching 'ordered' and 'unordered' floating point min/max
constructs.

In LLVM we can express min/max functions as a combination of compare and select.
We have support for matching such constructs for integers but not for floating
point. In floating point math there is no total order because of the presence of
'NaN'. Therefore, we have to be careful to preserve the original fcmp semantics
when interpreting floating point compare select combinations as a minimum or
maximum function. The resulting 'ordered/unordered' floating point maximum
function has to select the same value as the select/fcmp combination it is based
on.

 ordered_max(x,y)   = max(x,y) iff x and y are not NaN, y otherwise
 unordered_max(x,y) = max(x,y) iff x and y are not NaN, x otherwise
 ordered_min(x,y)   = min(x,y) iff x and y are not NaN, y otherwise
 unordered_min(x,y) = min(x,y) iff x and y are not NaN, x otherwise

This matches the behavior of the underlying select(fcmp(olt/ult/.., L, R), L, R)
construct.

Any code using this predicate has to preserve this semantics.

A follow-up patch will use this to implement floating point min/max reductions
in the vectorizer.

radar://13723044

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181143 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-05 01:54:46 +00:00
..
ADT Add ArrayRef constructor from None, and do the cleanups that this constructor enables 2013-05-05 00:40:33 +00:00
Analysis RegionInfo: Add helpers to replace entry/exit recursively 2013-04-10 06:54:49 +00:00
Assembly Enable *BasicBlockPass::createPrinterPass() 2013-02-08 23:37:41 +00:00
Bitcode Whitespace cleanup 2013-04-01 02:28:07 +00:00
CodeGen Add ArrayRef constructor from None, and do the cleanups that this constructor enables 2013-05-05 00:40:33 +00:00
Config Allow host triple to be correctly overridden in CMake builds 2013-05-04 07:36:23 +00:00
DebugInfo Create a stub for DWARF parser unittests 2013-04-17 08:29:02 +00:00
ExecutionEngine This patch breaks up Wrap.h so that it does not have to include all of 2013-05-01 20:59:00 +00:00
IR Add ArrayRef constructor from None, and do the cleanups that this constructor enables 2013-05-05 00:40:33 +00:00
IRReader Split out the IRReader header and the utility functions it provides into 2013-03-26 02:25:37 +00:00
MC Add ArrayRef constructor from None, and do the cleanups that this constructor enables 2013-05-05 00:40:33 +00:00
Object Revert r181009. 2013-05-03 23:57:17 +00:00
Option Use LLVM_DELETED_FUNCTION rather than '// do not implement' comments. 2013-02-18 23:11:17 +00:00
Support PatternMatch: Matcher for (un)ordered floating point min/max 2013-05-05 01:54:46 +00:00
TableGen Make sure TableGen exits with an error code after printing errors. 2013-03-20 20:43:11 +00:00
Target Move C++ code out of the C headers and into either C++ headers 2013-04-22 22:47:22 +00:00
Transforms fix a typo that due to cu&paste quadrupled itself 2013-04-26 18:10:50 +00:00
AutoUpgrade.h
CMakeLists.txt Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
DebugInfo.h Revert "Revert "PR14606: debug info imported_module support"" 2013-04-22 06:12:31 +00:00
DIBuilder.h Make doxygen comment match declaration. 2013-04-22 15:21:03 +00:00
GVMaterializer.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
InitializePasses.h Add support for bottom-up SLP vectorization infrastructure. 2013-04-09 19:44:35 +00:00
InstVisitor.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
LinkAllIR.h Rename LinkAllVMCore.h to LinkAllIR.h since VMCore directory was renamed to IR. 2013-01-10 21:55:02 +00:00
LinkAllPasses.h Add support for bottom-up SLP vectorization infrastructure. 2013-04-09 19:44:35 +00:00
Linker.h Fix a performance bug in the Linker. 2013-05-04 05:05:18 +00:00
Pass.h moves doInitialization and doFinalization to the Pass class and removes some unreachable code in MachineModuleInfo 2012-12-03 21:56:57 +00:00
PassAnalysisSupport.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
PassManager.h This patch breaks up Wrap.h so that it does not have to include all of 2013-05-01 20:59:00 +00:00
PassManagers.h Use a DenseMap instead of a std::map for AnalysisID -> Pass* maps. This reduces the pass-manager overhead from FPPassManager::runOnFunction() by about 10%. 2013-02-26 01:31:59 +00:00
PassRegistry.h This patch breaks up Wrap.h so that it does not have to include all of 2013-05-01 20:59:00 +00:00
PassSupport.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00