llvm/lib/Transforms/InstCombine
James Molloy cd45f4f580 Add support for floating-point minnum and maxnum
The select pattern recognition in ValueTracking (as used by InstCombine
and SelectionDAGBuilder) only knew about integer patterns. This teaches
it about minimum and maximum operations.

matchSelectPattern() has been extended to return a struct containing the
existing Flavor and a new enum defining the pattern's behavior when
given one NaN operand.

C minnum() is defined to return the non-NaN operand in this case, but
the idiomatic C "a < b ? a : b" would return the NaN operand.

ARM and AArch64 at least have different instructions for these different cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244580 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-11 09:12:57 +00:00
..
CMakeLists.txt
InstCombineAddSub.cpp [InstCombine] Generalize sub of selects optimization to all BinaryOperators 2015-07-14 22:39:23 +00:00
InstCombineAndOrXor.cpp
InstCombineCalls.cpp [InstCombine] Move SSE2/AVX2 arithmetic vector shift folding to instcombiner 2015-08-10 20:21:15 +00:00
InstCombineCasts.cpp Add support for floating-point minnum and maxnum 2015-08-11 09:12:57 +00:00
InstCombineCompares.cpp [InstSimplify] Fold away ord/uno fcmps when nnan is present. 2015-07-10 14:02:02 +00:00
InstCombineInternal.h [InstCombine] Employ AliasAnalysis in FindAvailableLoadedValue 2015-07-10 06:55:49 +00:00
InstCombineLoadStoreAlloca.cpp [InstCombine] Actually combine AA metadata when replacing one load with another 2015-07-10 22:30:17 +00:00
InstCombineMulDivRem.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
InstCombinePHI.cpp don't repeat function names in comments; NFC 2015-06-23 23:05:08 +00:00
InstCombineSelect.cpp Add support for floating-point minnum and maxnum 2015-08-11 09:12:57 +00:00
InstCombineShifts.cpp
InstCombineSimplifyDemanded.cpp Add support for floating-point minnum and maxnum 2015-08-11 09:12:57 +00:00
InstCombineVectorOps.cpp [InstSimplify] Teach InstSimplify how to simplify extractelement 2015-07-13 01:15:53 +00:00
InstructionCombining.cpp Fix some comment typos. 2015-08-08 18:27:36 +00:00
LLVMBuild.txt
Makefile