llvm-project/llvm/lib/CodeGen/SelectionDAG
Heejin Ahn d20d0648ed [DAGCombiner] Fix a case of 1 in non-splat vector pow2 divisor
Summary:
D42479 (rL329525) enabled SDIV combine for pow2 non-splat vector
dividers. But when there is a 1 in a vector, the instruction sequence to
be generated involves shifting a value by the number of its bit widths,
which is undefined
(c64f4dbfe3/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (L6000-L6006)).

Especially, in architectures that do not support vector instructions,
each of element in a vector will be computed separately using scalar
operations, and then the resulting value will be undef for '1' values
in a vector.

(All 1's vector is fine; only vectors mixed with 1 and others will be
affected.)

Reviewers: RKSimon, jgravelle-google

Subscribers: jfb, dschuff, sbc100, jgravelle-google, llvm-commits

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

llvm-svn: 331092
2018-04-27 22:23:11 +00:00
..
CMakeLists.txt Remove trailing whitespace to trigger re-cmaking 2017-10-02 21:54:38 +00:00
DAGCombiner.cpp [DAGCombiner] Fix a case of 1 in non-splat vector pow2 divisor 2018-04-27 22:23:11 +00:00
FastISel.cpp [FastISel] Actually enable local value sinking by default 2018-04-27 21:51:25 +00:00
FunctionLoweringInfo.cpp [AMDGPU] Fix issues for backend divergence tracking 2018-04-18 13:53:31 +00:00
InstrEmitter.cpp [SelectionDAG] Provide adequate register class for RegisterSDNode 2018-02-09 13:55:25 +00:00
InstrEmitter.h
LLVMBuild.txt
LegalizeDAG.cpp [IR][CodeGen] Remove dependency on EVT from IR/Function.cpp. Move EVT to CodeGen layer. 2018-03-29 17:21:10 +00:00
LegalizeFloatTypes.cpp [PowerPC][LegalizeFloatTypes] Move the PPC hacks for (i32 fp_to_sint/fp_to_uint (ppcf128 X)) out of LegalizeFloatTypes and into PPC specific code 2018-03-20 18:49:28 +00:00
LegalizeIntegerTypes.cpp [LegalizeTypes] Remove unnecessary type action check on the type of operand 0 when promoting shift result type. NFC 2018-04-12 06:51:58 +00:00
LegalizeTypes.cpp Remap values in PromotedFloats 2018-03-27 17:42:36 +00:00
LegalizeTypes.h [SelectionDAG] Don't promote mask operand when widening mstore and mscatter. 2017-12-05 23:08:30 +00:00
LegalizeTypesGeneric.cpp [SelectionDAG] Replace a std::vector<SDValue> with a SmallVector. 2018-01-26 07:15:22 +00:00
LegalizeVectorOps.cpp DAG: Fix not legalizing vector fcanonicalizes 2018-04-26 19:21:37 +00:00
LegalizeVectorTypes.cpp [LegalizeTypes] In SplitVecOp_TruncateHelper, use GetSplitVector on the input instead of creating new extract_subvectors. 2018-03-13 01:17:40 +00:00
ResourcePriorityQueue.cpp Silence a bunch of implicit fallthrough warnings 2017-12-19 22:05:25 +00:00
SDNodeDbgValue.h Doxygenify comments. 2017-10-24 17:23:40 +00:00
ScheduleDAGFast.cpp Add DBG_VALUE support to the linear DAG scheduler 2018-03-02 22:59:51 +00:00
ScheduleDAGRRList.cpp Fix layering of MachineValueType.h by moving it from CodeGen to Support 2018-03-23 23:58:25 +00:00
ScheduleDAGSDNodes.cpp [CodeGen] Change std::sort to llvm::sort in response to r327219 2018-04-06 18:08:42 +00:00
ScheduleDAGSDNodes.h Fix layering of MachineValueType.h by moving it from CodeGen to Support 2018-03-23 23:58:25 +00:00
ScheduleDAGVLIW.cpp [CodeGen] Unify MBB reference format in both MIR and debug output 2017-12-04 17:18:51 +00:00
SelectionDAG.cpp [SelectionDAG] Refactor lowering of atomic memory intrinsics. 2018-04-23 15:40:37 +00:00
SelectionDAGAddressAnalysis.cpp [DAG] Teach findBaseOffset to interpret indexes of indexed memory operations 2018-01-26 16:51:27 +00:00
SelectionDAGBuilder.cpp [SelectionDAG] Refactor lowering of atomic memory intrinsics. 2018-04-23 15:40:37 +00:00
SelectionDAGBuilder.h [IR][CodeGen] Remove dependency on EVT from IR/Function.cpp. Move EVT to CodeGen layer. 2018-03-29 17:21:10 +00:00
SelectionDAGDumper.cpp [SelectionDAG] Dump debug locs in SDNodes 2018-04-23 17:18:24 +00:00
SelectionDAGISel.cpp [X86] Use APInt::isSubsetof instead of APInt::intersects to avoid a negation of an APInt value. NFC 2018-04-15 19:11:25 +00:00
SelectionDAGPrinter.cpp Remove redundant includes from lib/CodeGen. 2017-12-13 21:30:47 +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 Fix layering of MachineValueType.h by moving it from CodeGen to Support 2018-03-23 23:58: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 Move TargetLoweringObjectFile from CodeGen to Target to fix layering 2018-03-23 23:58:19 +00:00