llvm-project/llvm/lib/CodeGen/SelectionDAG
David Majnemer 4543ff09a2 [X86] Don't transform X << 1 to X + X during type legalization
While legalizing a 64-bit shift left by 1, the following occurs:

We split the shift operand in half: a high half and a low half.
We then create an ADDC with the low half and a ADDE with the high half +
the carry bit from the ADDC.

This is problematic if X is any_ext'd because the high half computation
is now undef + undef + carry bit and there is no way to ensure that the
two undef values had the same bitwise representation.  This results in
the lowest bit in the high half turning into garbage.

Instead, do not try to turn shifts into arithmetic during type
legalization.

This fixes PR26350.

llvm-svn: 259065
2016-01-28 18:20:05 +00:00
..
CMakeLists.txt Rename TargetSelectionDAGInfo into SelectionDAGTargetInfo and move it to CodeGen/ 2016-01-27 16:32:26 +00:00
DAGCombiner.cpp [DAGCombiner] Don't add volatile or indexed stores to ChainedStores 2016-01-28 06:23:33 +00:00
FastISel.cpp [NFC] Replace several manual GEP loops with gep_type_iterator. 2016-01-20 00:26:52 +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 [SDAG] Give InstrEmitter hidden visibility 2015-07-01 14:55:10 +00:00
LLVMBuild.txt
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 [X86] Don't transform X << 1 to X + X during type legalization 2016-01-28 18:20: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
ResourcePriorityQueue.cpp Fix some comment typos. 2015-08-08 18:27:36 +00:00
SDNodeDbgValue.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
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 Add allnodes() iterator range to SelectionDAG. NFC. 2015-07-14 22:10:54 +00:00
ScheduleDAGSDNodes.h [SelectionDAG] Remove dead code. NFC. 2015-10-15 17:54:06 +00:00
ScheduleDAGVLIW.cpp Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
SelectionDAG.cpp Rename TargetSelectionDAGInfo into SelectionDAGTargetInfo and move it to CodeGen/ 2016-01-27 16:32:26 +00:00
SelectionDAGBuilder.cpp Rename TargetSelectionDAGInfo into SelectionDAGTargetInfo and move it to CodeGen/ 2016-01-27 16:32:26 +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 Don't check if a list is empty with ilist::size. 2016-01-23 20:58:09 +00:00
SelectionDAGPrinter.cpp Make the SelectionDAG graph printer use SDNode::PersistentId labels. 2015-10-27 23:09:03 +00:00
SelectionDAGTargetInfo.cpp Rename TargetSelectionDAGInfo into SelectionDAGTargetInfo and move it to CodeGen/ 2016-01-27 16:32:26 +00:00
StatepointLowering.cpp [Statepoints] Add test cases around vectors and stablize test 2016-01-07 04:15:31 +00:00
StatepointLowering.h [StatepointLowering] Support of the gc.relocates for invoke statepoints. 2015-05-20 11:37:25 +00:00
TargetLowering.cpp Fixed MSVC warning that not all control paths return a value. 2016-01-18 22:54:46 +00:00