llvm-6502/lib/CodeGen/SelectionDAG
Chandler Carruth 63974b2144 Initial CodeGen support for CTTZ/CTLZ where a zero input produces an
undefined result. This adds new ISD nodes for the new semantics,
selecting them when the LLVM intrinsic indicates that the undef behavior
is desired. The new nodes expand trivially to the old nodes, so targets
don't actually need to do anything to support these new nodes besides
indicating that they should be expanded. I've done this for all the
operand types that I could figure out for all the targets. Owners of
various targets, please review and let me know if any of these are
incorrect.

Note that the expand behavior is *conservatively correct*, and exactly
matches LLVM's current behavior with these operations. Ideally this
patch will not change behavior in any way. For example the regtest suite
finds the exact same instruction sequences coming out of the code
generator. That's why there are no new tests here -- all of this is
being exercised by the existing test suite.

Thanks to Duncan Sands for reviewing the various bits of this patch and
helping me get the wrinkles ironed out with expanding for each target.
Also thanks to Chris for clarifying through all the discussions that
this is indeed the approach he was looking for. That said, there are
likely still rough spots. Further review much appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146466 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-13 01:56:10 +00:00
..
CMakeLists.txt build/CMake: Finish removal of add_llvm_library_dependencies. 2011-11-29 19:25:30 +00:00
DAGCombiner.cpp Initial CodeGen support for CTTZ/CTLZ where a zero input produces an 2011-12-13 01:56:10 +00:00
FastISel.cpp [fast-isel] SelectInsertValue seems to be causing miscompiles for ARM. Disable while I investigate. 2011-12-10 21:27:40 +00:00
FunctionLoweringInfo.cpp An array of chars of length 8 will also cause the stack protector to be inserted 2011-11-02 23:20:58 +00:00
InstrEmitter.cpp Add bundle aware API for querying instruction properties and switch the code 2011-12-07 07:15:52 +00:00
InstrEmitter.h Simplify EXTRACT_SUBREG emission. 2011-10-05 20:26:40 +00:00
LegalizeDAG.cpp Initial CodeGen support for CTTZ/CTLZ where a zero input produces an 2011-12-13 01:56:10 +00:00
LegalizeFloatTypes.cpp Added invariant field to the DAG.getLoad method and changed all calls. 2011-11-08 18:42:53 +00:00
LegalizeIntegerTypes.cpp Initial CodeGen support for CTTZ/CTLZ where a zero input produces an 2011-12-13 01:56:10 +00:00
LegalizeTypes.cpp Added invariant field to the DAG.getLoad method and changed all calls. 2011-11-08 18:42:53 +00:00
LegalizeTypes.h 1. Fix the widening of SETCC in WidenVecOp_SETCC. Use the correct return CC type. 2011-10-21 11:42:07 +00:00
LegalizeTypesGeneric.cpp Remove some unnecessary includes of PseudoSourceValue.h. 2011-11-15 07:50:46 +00:00
LegalizeVectorOps.cpp Initial CodeGen support for CTTZ/CTLZ where a zero input produces an 2011-12-13 01:56:10 +00:00
LegalizeVectorTypes.cpp Initial CodeGen support for CTTZ/CTLZ where a zero input produces an 2011-12-13 01:56:10 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
Makefile
ScheduleDAGFast.cpp - Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo and 2011-06-28 19:10:37 +00:00
ScheduleDAGRRList.cpp Make sure we correctly set LiveRegGens when a call is unscheduled. <rdar://problem/10460321>. No testcase because this is very sensitive to scheduling. 2011-12-07 22:24:28 +00:00
ScheduleDAGSDNodes.cpp Rename TargetSubtarget to TargetSubtargetInfo for consistency. 2011-07-01 21:01:15 +00:00
ScheduleDAGSDNodes.h The index stored in the RegDefIter is one after the current index. When getting the index, decrement it so that it points to the current element. Fixes an off-by-one bug encountered when trying to make use of MVT::untyped. 2011-06-27 18:34:12 +00:00
SDNodeDbgValue.h Do not lose debug info of an inlined function argument even if the argument is only used through GEPs. 2011-02-18 22:43:42 +00:00
SDNodeOrdering.h
SelectionDAG.cpp Initial CodeGen support for CTTZ/CTLZ where a zero input produces an 2011-12-13 01:56:10 +00:00
SelectionDAGBuilder.cpp Initial CodeGen support for CTTZ/CTLZ where a zero input produces an 2011-12-13 01:56:10 +00:00
SelectionDAGBuilder.h Enhance both TargetLibraryInfo and SelectionDAGBuilder so that the latter can use the former to prevent the formation of libm SDNode's when -fno-builtin is passed. 2011-12-08 22:15:21 +00:00
SelectionDAGISel.cpp [fast-isel] Guard "exhastive" fast-isel output with -fast-isel-verbose2. 2011-12-13 00:05:11 +00:00
SelectionDAGPrinter.cpp Twinify GraphWriter a little bit. 2011-11-15 16:26:38 +00:00
TargetLowering.cpp Fix a couple of logic bugs in TargetLowering::SimplifyDemandedBits. PR11514. 2011-12-09 01:16:26 +00:00
TargetSelectionDAGInfo.cpp Implement a bunch more TargetSelectionDAGInfo infrastructure. 2010-05-11 17:31:57 +00:00