1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00
llvm-mirror/lib/CodeGen/SelectionDAG
Tom Stellard a09c2fcc35 TargetLowering: Improve handling of (setcc ([sz]ext x) 0, cc) in SimplifySetCC
Summary:
When SimplifySetCC sees a setcc node that compares the result of a
value extension operation with a constant, it tries to simplify the
setcc node by eliminating the extension and shrinking the constant.

If shrinking the inputs to setcc is deemed not desirable by the target
(e.g. the target does not want a setcc comparing i1 values), then it
is still possible to optimize this sequence in some cases.

This patch adds the following combines to SimplifySetCC when shrinking setcc
inputs is not desirable:

(setcc ([sz]ext (setcc x, y, cc)), 0, setne) -> (setcc (x, y, cc))
(setcc ([sz]ext (setcc x, y, cc)), 0, seteq) -> (setcc (x, Y, !cc))

There are no tests for this yet, but once AMDGPU correctly implements
TargetLowering::isTypeDesirableForOp(), this new combine will be
exercised by the existing CodeGen/AMDGPU/setcc-opt.ll test.

Reviewers: resistor, arsenm

Subscribers: jroelofs, arsenm, llvm-commits

Differential Revision: http://reviews.llvm.org/D15034

llvm-svn: 258067
2016-01-18 19:55:21 +00:00
..
CMakeLists.txt
DAGCombiner.cpp [DAGCombiner] don't dereference an operand that doesn't exist (PR26070) 2016-01-08 19:53:24 +00:00
FastISel.cpp [opaque pointer types] [NFC] CallSite: use getFunctionType() instead of going through PointerType::getElementType. 2016-01-17 22:37:39 +00:00
FunctionLoweringInfo.cpp Undo spurious change made in r256965 2016-01-07 04:31:35 +00:00
InstrEmitter.cpp [X86] Part 1 to fix x86-64 fp128 calling convention. 2015-12-03 22:02:40 +00:00
InstrEmitter.h
LegalizeDAG.cpp [CodeGen] Don't assume fp_to_fp16 produces i16 when legalizing it. 2016-01-14 19:45:36 +00:00
LegalizeFloatTypes.cpp Do not try to use i8 and i16 versions of FP_TO_U/SINT soft float library calls 2015-12-15 12:55:50 +00:00
LegalizeIntegerTypes.cpp Do not ASSERTZEXT for i16 result of bitcast from f16 operand 2016-01-08 17:46:05 +00:00
LegalizeTypes.cpp Type legalizer for masked gather and scatter intrinsics. 2015-12-15 08:40:41 +00:00
LegalizeTypes.h SelectionDAG: Cleanup integer bin op promotion functions. 2015-12-19 17:18:43 +00:00
LegalizeTypesGeneric.cpp [X86] Part 1 to fix x86-64 fp128 calling convention. 2015-12-03 22:02:40 +00:00
LegalizeVectorOps.cpp [SelectionDAG] Teach LegalizeVectorOps to not unroll CTLZ_ZERO_UNDEF and CTTZ_ZERO_UNDEF if the non-ZERO_UNDEF form is legal or custom. Will be used to simplify X86 code in a follow on commit. 2015-12-27 21:33:47 +00:00
LegalizeVectorTypes.cpp Type legalizer for masked gather and scatter intrinsics. 2015-12-15 08:40:41 +00:00
LLVMBuild.txt
Makefile
ResourcePriorityQueue.cpp
ScheduleDAGFast.cpp Replace uint16_t with the MCPhysReg typedef in many places. A lot of physical register arrays already use this typedef. 2015-12-05 07:13:35 +00:00
ScheduleDAGRRList.cpp Replace uint16_t with the MCPhysReg typedef in many places. A lot of physical register arrays already use this typedef. 2015-12-05 07:13:35 +00:00
ScheduleDAGSDNodes.cpp
ScheduleDAGSDNodes.h [SelectionDAG] Remove dead code. NFC. 2015-10-15 17:54:06 +00:00
ScheduleDAGVLIW.cpp
SDNodeDbgValue.h
SelectionDAG.cpp [SelectionDAG] CSE nodes with differing SDNodeFlags 2016-01-15 21:56:40 +00:00
SelectionDAGBuilder.cpp [opaque pointer types] [NFC] CallSite: use getFunctionType() instead of going through PointerType::getElementType. 2016-01-17 22:37:39 +00:00
SelectionDAGBuilder.h [Statepoints] Refactor GCRelocateOperands into an intrinsic wrapper. NFC. 2016-01-05 04:03:00 +00:00
SelectionDAGDumper.cpp Revert r248483, r242546, r242545, and r242409 - absdiff intrinsics 2015-12-11 23:11:52 +00:00
SelectionDAGISel.cpp [X86] Don't alter HasOpaqueSPAdjustment after we've relied on it 2016-01-14 01:20:03 +00:00
SelectionDAGPrinter.cpp Make the SelectionDAG graph printer use SDNode::PersistentId labels. 2015-10-27 23:09:03 +00:00
StatepointLowering.cpp [Statepoints] Add test cases around vectors and stablize test 2016-01-07 04:15:31 +00:00
StatepointLowering.h
TargetLowering.cpp TargetLowering: Improve handling of (setcc ([sz]ext x) 0, cc) in SimplifySetCC 2016-01-18 19:55:21 +00:00
TargetSelectionDAGInfo.cpp