llvm-project/llvm/lib/CodeGen/SelectionDAG
Sanjay Patel 9633d76a40 [DAGCombiner][x86] scalarize binop followed by extractelement
As noted in PR39973 and D55558:
https://bugs.llvm.org/show_bug.cgi?id=39973
...this is a partial implementation of a fold that we do as an IR canonicalization in instcombine:

// extelt (binop X, Y), Index --> binop (extelt X, Index), (extelt Y, Index)

We want to have this in the DAG too because as we can see in some of the test diffs (reductions), 
the pattern may not be visible in IR.

Given that this is already an IR canonicalization, any backend that would prefer a vector op over 
a scalar op is expected to already have the reverse transform in DAG lowering (not sure if that's
a realistic expectation though). The transform is limited with a TLI hook because there's an
existing transform in CodeGenPrepare that tries to do the opposite transform.

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

llvm-svn: 350354
2019-01-03 21:31:16 +00:00
..
CMakeLists.txt Remove trailing whitespace to trigger re-cmaking 2017-10-02 21:54:38 +00:00
DAGCombiner.cpp [DAGCombiner][x86] scalarize binop followed by extractelement 2019-01-03 21:31:16 +00:00
FastISel.cpp FastIsel: take care to update iterators when removing instructions. 2018-12-17 17:25:53 +00:00
FunctionLoweringInfo.cpp AMDGPU: Fix various issues around the VirtReg2Value mapping 2018-11-30 22:55:29 +00:00
InstrEmitter.cpp [SDAG] Clarify the origin of chain in REG_SEQUENCE in comment, NFC 2018-12-17 20:30:20 +00:00
InstrEmitter.h [DebugInfo] Convert intrinsic llvm.dbg.label to MachineInstr. 2018-05-09 02:41:08 +00:00
LLVMBuild.txt
LegalizeDAG.cpp [TargetLowering] Add ISD::ROTL/ROTR vector expansion 2018-12-13 11:20:48 +00:00
LegalizeFloatTypes.cpp [NFC] Rename minnan and maxnan to minimum and maximum 2018-10-24 22:49:55 +00:00
LegalizeIntegerTypes.cpp [LegalizeIntegerTypes] When promoting the result of an extract_vector_elt also promote the input type if necessary 2019-01-02 17:58:30 +00:00
LegalizeTypes.cpp [DAG] Don't map a TableId to itself in the ReplacedValues map 2018-06-20 16:06:09 +00:00
LegalizeTypes.h [Intrinsic] Signed Fixed Point Multiplication Intrinsic 2018-12-12 06:29:14 +00:00
LegalizeTypesGeneric.cpp [LegalizeTypes] Fix bad indentation. NFC 2018-09-23 21:17:55 +00:00
LegalizeVectorOps.cpp [TargetLowering] Add ISD::ROTL/ROTR vector expansion 2018-12-13 11:20:48 +00:00
LegalizeVectorTypes.cpp [SelectionDAG][X86] Fix [US](ADD|SUB)SAT vector legalization, add tests 2018-12-18 13:22:53 +00:00
ResourcePriorityQueue.cpp Silence a bunch of implicit fallthrough warnings 2017-12-19 22:05:25 +00:00
SDNodeDbgValue.h [DebugInfo] Emit undef DBG_VALUEs when SDNodes are optimised out 2018-12-10 11:20:47 +00:00
ScheduleDAGFast.cpp [DebugInfo] Emit undef DBG_VALUEs when SDNodes are optimised out 2018-12-10 11:20:47 +00:00
ScheduleDAGRRList.cpp ScheduleDAG: Cleanup dumping code; NFC 2018-09-19 00:23:35 +00:00
ScheduleDAGSDNodes.cpp [DebugInfo] Emit undef DBG_VALUEs when SDNodes are optimised out 2018-12-10 11:20:47 +00:00
ScheduleDAGSDNodes.h ScheduleDAG: Cleanup dumping code; NFC 2018-09-19 00:23:35 +00:00
ScheduleDAGVLIW.cpp ScheduleDAG: Cleanup dumping code; NFC 2018-09-19 00:23:35 +00:00
SelectionDAG.cpp [SelectionDAG] Add SIGN_EXTEND_VECTOR_INREG support to computeKnownBits. 2018-12-31 19:09:30 +00:00
SelectionDAGAddressAnalysis.cpp [SelectionDAG] Teach BaseIndexOffset::match to unwrap the base after looking through an add/or 2018-11-26 20:16:33 +00:00
SelectionDAGBuilder.cpp Reversing the commit in revision 350186. Revision causes regression in 4 2019-01-01 07:28:55 +00:00
SelectionDAGBuilder.h Reversing the commit in revision 350186. Revision causes regression in 4 2019-01-01 07:28:55 +00:00
SelectionDAGDumper.cpp [Intrinsic] Signed Fixed Point Multiplication Intrinsic 2018-12-12 06:29:14 +00:00
SelectionDAGISel.cpp [SelectionDAG] Always use the version of computeKnownBits that returns a value. NFCI. 2018-12-21 14:56:18 +00:00
SelectionDAGPrinter.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
SelectionDAGTargetInfo.cpp [CodeGen] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-09-13 21:15:20 +00:00
StatepointLowering.cpp [CodeGen] Prefer static frame index for STATEPOINT liveness args 2018-11-30 16:22:41 +00:00
StatepointLowering.h [IR][CodeGen] Remove dependency on EVT from IR/Function.cpp. Move EVT to CodeGen layer. 2018-03-29 17:21:10 +00:00
TargetLowering.cpp [SelectionDAG] Always use the version of computeKnownBits that returns a value. NFCI. 2018-12-21 14:56:18 +00:00