llvm-project/llvm/lib/CodeGen/SelectionDAG
Ahmed Bougacha 9f336c4ec5 [SelectionDAG] When scalarizing trunc, don't assert for legal operands.
r212242 introduced a legalizer hook, originally to let AArch64 widen
v1i{32,16,8} rather than scalarize, because the legalizer expected, when
scalarizing the result of a conversion operation, to already have
scalarized the operands.  On AArch64, v1i64 is legal, so that commit
ensured operations such as v1i32 = trunc v1i64 wouldn't assert.

It did that by choosing to widen v1 types whenever possible.  However,
v1i1 types, for which there's no legal widened type, would still trigger
the assert.

This commit fixes that, by only scalarizing a trunc's result when the
operand has already been scalarized, and introducing an extract_elt
otherwise.  
This is similar to r205625.

Fixes PR20777.

llvm-svn: 220937
2014-10-30 23:46:50 +00:00
..
CMakeLists.txt llvm/lib: [CMake] Add explicit dependency to intrinsics_gen. 2012-06-24 13:32:01 +00:00
DAGCombiner.cpp Fix incorrect invariant check in DAG Combine 2014-10-30 22:21:03 +00:00
FastISel.cpp Introduce enum values for previously defined metadata types. (NFC) 2014-10-21 00:13:20 +00:00
FunctionLoweringInfo.cpp Remove uses of the TargetMachine from FunctionLoweringInfo 2014-10-09 00:57:31 +00:00
InstrEmitter.cpp Remove the uses of getSubtargetImpl from InstrEmitter and remove 2014-10-09 01:35:29 +00:00
InstrEmitter.h Remove the uses of getSubtargetImpl from InstrEmitter and remove 2014-10-09 01:35:29 +00:00
LLVMBuild.txt
LegalizeDAG.cpp Add minnum / maxnum codegen 2014-10-21 23:01:01 +00:00
LegalizeFloatTypes.cpp Add minnum / maxnum codegen 2014-10-21 23:01:01 +00:00
LegalizeIntegerTypes.cpp Whitespace. 2014-10-29 15:23:11 +00:00
LegalizeTypes.cpp Make it possible for ints/floats to return different values from getBooleanContents() 2014-07-10 10:18:12 +00:00
LegalizeTypes.h Add minnum / maxnum codegen 2014-10-21 23:01:01 +00:00
LegalizeTypesGeneric.cpp AA metadata refactoring (introduce AAMDNodes) 2014-07-24 12:16:19 +00:00
LegalizeVectorOps.cpp Add minnum / maxnum codegen 2014-10-21 23:01:01 +00:00
LegalizeVectorTypes.cpp [SelectionDAG] When scalarizing trunc, don't assert for legal operands. 2014-10-30 23:46:50 +00:00
Makefile
ResourcePriorityQueue.cpp Remove unused argument to CreateTargetScheduleState and change 2014-10-09 01:59:35 +00:00
SDNodeDbgValue.h constify the getters in SDNodeDbgValue. 2014-10-13 20:43:47 +00:00
ScheduleDAGFast.cpp ScheduleDAG: record PhysReg dependencies represented by CopyFromReg nodes 2014-10-23 22:31:48 +00:00
ScheduleDAGRRList.cpp ScheduleDAG: record PhysReg dependencies represented by CopyFromReg nodes 2014-10-23 22:31:48 +00:00
ScheduleDAGSDNodes.cpp ScheduleDAG: record PhysReg dependencies represented by CopyFromReg nodes 2014-10-23 22:31:48 +00:00
ScheduleDAGSDNodes.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
ScheduleDAGVLIW.cpp Remove more calls to getSubtargetImpl from the schedulers and 2014-10-09 06:28:06 +00:00
SelectionDAG.cpp Modernize old-style static asserts. NFC. 2014-10-12 17:56:40 +00:00
SelectionDAGBuilder.cpp Fix copy paste comment 2014-10-24 18:13:10 +00:00
SelectionDAGBuilder.h Add minnum / maxnum codegen 2014-10-21 23:01:01 +00:00
SelectionDAGDumper.cpp Add minnum / maxnum codegen 2014-10-21 23:01:01 +00:00
SelectionDAGISel.cpp Remove uses of the TargetMachine from FunctionLoweringInfo 2014-10-09 00:57:31 +00:00
SelectionDAGPrinter.cpp Revert "Introduce a string_ostream string builder facilty" 2014-06-26 22:52:05 +00:00
TargetLowering.cpp Whitespace. 2014-10-29 15:23:11 +00:00
TargetSelectionDAGInfo.cpp Have TargetSelectionDAGInfo take a DataLayout initializer rather than 2014-06-06 19:04:48 +00:00