llvm-project/llvm/lib/CodeGen/SelectionDAG
Craig Topper 883ff69c93 [DAGCombiner] Don't reassociate operations that have the vector reduction flag set.
When nodes are reassociated the vector-reduction flag gets lost.

The test case is here is what would happen if you had a sum of absolute differences loop that started with a non-zero but contant sum and that loop was unrolled. The vectorizer will generate a constant vector for the initial value. And DAGCombiner reassociate tries to move it down the addition tree erasing the vector-reduction flag. Interestingly this moves constants the opposite direction of the reassociate IR pass.

I've chosen to just punt on the reassociate, but I suppose we could maybe preserve the flag if both nodes have it set.

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

llvm-svn: 339946
2018-08-16 21:54:05 +00:00
..
CMakeLists.txt Remove trailing whitespace to trigger re-cmaking 2017-10-02 21:54:38 +00:00
DAGCombiner.cpp [DAGCombiner] Don't reassociate operations that have the vector reduction flag set. 2018-08-16 21:54:05 +00:00
FastISel.cpp Remove trailing space 2018-07-30 19:41:25 +00:00
FunctionLoweringInfo.cpp DAG: Add calling convention argument to calling convention funcs 2018-07-28 13:25:19 +00:00
InstrEmitter.cpp [MI] Change the array of `MachineMemOperand` pointers to be 2018-08-16 21:30:05 +00:00
InstrEmitter.h [DebugInfo] Convert intrinsic llvm.dbg.label to MachineInstr. 2018-05-09 02:41:08 +00:00
LLVMBuild.txt
LegalizeDAG.cpp Fix FCOPYSIGN expansion 2018-08-02 01:54:12 +00:00
LegalizeFloatTypes.cpp DAG: Try to custom lower when promoting float operands 2018-08-15 20:34:54 +00:00
LegalizeIntegerTypes.cpp [SelectionDAG] Improve the legalisation lowering of UMULO. 2018-08-16 18:39:39 +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 [FPEnv] Scalarize StrictFP vector operations 2018-08-14 22:13:11 +00:00
LegalizeTypesGeneric.cpp Avoid losing Hi part when expanding VAARG nodes on big endian machines 2018-07-16 12:14:17 +00:00
LegalizeVectorOps.cpp Remove trailing space 2018-07-30 19:41:25 +00:00
LegalizeVectorTypes.cpp [FPEnv] Scalarize StrictFP vector operations 2018-08-14 22:13:11 +00:00
ResourcePriorityQueue.cpp Silence a bunch of implicit fallthrough warnings 2017-12-19 22:05:25 +00:00
SDNodeDbgValue.h [DebugInfo] LowerDbgDeclare: Add derefs when handling CallInst users 2018-07-26 20:56:53 +00:00
ScheduleDAGFast.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
ScheduleDAGRRList.cpp [ScheduleDAG] Fix unfolding of SUnits to already existent nodes. 2018-07-18 18:01:03 +00:00
ScheduleDAGSDNodes.cpp [SDAG] Remove the reliance on MI's allocation strategy for 2018-08-14 23:30:32 +00:00
ScheduleDAGSDNodes.h [CodeGen] Fix inconsistent declaration parameter name 2018-07-16 18:51:40 +00:00
ScheduleDAGVLIW.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
SelectionDAG.cpp [SDAG] Remove the reliance on MI's allocation strategy for 2018-08-14 23:30:32 +00:00
SelectionDAGAddressAnalysis.cpp [DAG] Teach findBaseOffset to interpret indexes of indexed memory operations 2018-01-26 16:51:27 +00:00
SelectionDAGBuilder.cpp [SDAG] Remove the reliance on MI's allocation strategy for 2018-08-14 23:30:32 +00:00
SelectionDAGBuilder.h DAG: Add calling convention argument to calling convention funcs 2018-07-28 13:25:19 +00:00
SelectionDAGDumper.cpp Get rid of SETCCE 2018-06-04 18:36:22 +00:00
SelectionDAGISel.cpp [SDAG] Remove the reliance on MI's allocation strategy for 2018-08-14 23:30:32 +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 Remove trailing space 2018-07-30 19:41:25 +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 [TargetLowering] Add support for non-uniform vectors to BuildSDIV 2018-08-16 17:44:33 +00:00