llvm-project/llvm/lib/CodeGen/SelectionDAG
Sanjay Patel f368040c14 [DAGCombiner] try to move splat after binop with splat constant
binop (splat X), (splat C) --> splat (binop X, C)
binop (splat C), (splat X) --> splat (binop C, X)

We do this in IR, and there's a similar fold for the case with 2
non-constant operands just above the code diff in this patch.

This was discussed in D79718, and the extra shuffle in the test
(llvm/test/CodeGen/X86/vector-fshl-128.ll::sink_splatvar) where it
was noticed disappears because demanded elements analysis is no
longer blocked. The large majority of the test diffs seem to be
benign code scheduling changes, but I do see another type of win:
moving the splat later allows binop narrowing in some cases.

Regressions were avoided on x86 and ARM with the INSERT_VECTOR_ELT
restriction.

Differential Revision: https://reviews.llvm.org/D79886
2020-05-26 08:12:46 -04:00
..
CMakeLists.txt [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
DAGCombiner.cpp [DAGCombiner] try to move splat after binop with splat constant 2020-05-26 08:12:46 -04:00
FastISel.cpp Reland [X86] Codegen for preallocated 2020-05-20 11:25:44 -07:00
FunctionLoweringInfo.cpp FunctionLoweringInfo.h - move APInt.h dependency to FunctionLoweringInfo.cpp. NFC. 2020-05-25 12:58:35 +01:00
InstrEmitter.cpp TargetLowering.h - remove unnecessary TargetMachine.h include. NFC 2020-05-23 19:49:38 +01:00
InstrEmitter.h InstrEmitter.h - reduce SelectionDAG.h include to SelectionDAGNodes.h include. 2020-04-19 11:52:31 +01:00
LLVMBuild.txt
LegalizeDAG.cpp [LegalizeDAG] Modify ExpandLegalINT_TO_FP to swap data for little/big endian instead of the pointers. 2020-05-20 22:29:59 -07:00
LegalizeFloatTypes.cpp [CodeGen] Support freeze expand for ppc_fp128 2020-04-20 07:27:41 +00:00
LegalizeIntegerTypes.cpp [SelectionDAG] Fix usage of Align constructing MachineMemOperands. 2020-04-15 13:01:41 -07:00
LegalizeTypes.cpp reland: [DAG] Fix PR45049: LegalizeTypes crash 2020-04-12 09:52:17 -06:00
LegalizeTypes.h [CodeGen] Support freeze expand for ppc_fp128 2020-04-20 07:27:41 +00:00
LegalizeTypesGeneric.cpp [SelectionDAG] Fix usage of Align constructing MachineMemOperands. 2020-04-15 13:01:41 -07:00
LegalizeVectorOps.cpp [SelectionDAG] Unify scalarizeVectorLoad and VectorLegalizer::ExpandLoad 2020-05-02 15:18:10 -07:00
LegalizeVectorTypes.cpp [LegalizeVectorTypes] Create correct memoperands in SplitVecRes_INSERT_SUBVECTOR. 2020-05-20 15:06:36 -07:00
ResourcePriorityQueue.cpp
SDNodeDbgValue.h
ScheduleDAGFast.cpp DAG: Use Register 2020-04-08 13:44:31 -04:00
ScheduleDAGRRList.cpp [ScheduleDAG] When a node is cloned, add an edge between the nodes. 2019-10-04 19:51:40 +00:00
ScheduleDAGSDNodes.cpp TargetLowering.h - remove unnecessary TargetMachine.h include. NFC 2020-05-23 19:49:38 +01:00
ScheduleDAGSDNodes.h DAG: Use Register 2020-04-08 13:44:31 -04:00
ScheduleDAGVLIW.cpp Prune Analysis includes from SelectionDAG.h 2019-10-19 01:07:48 +00:00
SelectionDAG.cpp Reland [X86] Codegen for preallocated 2020-05-20 11:25:44 -07:00
SelectionDAGAddressAnalysis.cpp Prune a LegacyDivergenceAnalysis and MachineLoopInfo include each 2019-10-19 01:31:09 +00:00
SelectionDAGBuilder.cpp [Align] Remove operations on MaybeAlign that asserted that it had a defined value. 2020-05-22 21:54:28 -07:00
SelectionDAGBuilder.h Add comment for SelectionDAGBuilder::SL field. 2020-05-12 10:46:08 -04:00
SelectionDAGDumper.cpp Reland [X86] Codegen for preallocated 2020-05-20 11:25:44 -07:00
SelectionDAGISel.cpp DAG: Use Register 2020-04-08 13:44:31 -04:00
SelectionDAGPrinter.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
SelectionDAGTargetInfo.cpp
StatepointLowering.cpp [Statepoint] Constant fold FP deopt args. 2020-05-21 11:02:54 +03:00
StatepointLowering.h StatepointLowering.h - remove unused includes. NFC. 2020-05-22 10:49:11 +01:00
TargetLowering.cpp [DAG] Add SimplifyDemandedVectorElts binop SimplifyMultipleUseDemandedBits handling 2020-05-25 12:41:22 +01:00