llvm-project/llvm/lib/CodeGen/SelectionDAG
Chris Lattner 10bd29f1d4 Add a couple dag combines to transform mulhi/mullo into a wider multiply
when the wider type is legal.  This allows us to compile:

define zeroext i16 @test1(i16 zeroext %x) nounwind {
entry:
	%div = udiv i16 %x, 33
	ret i16 %div
}

into:

test1:                                  # @test1
	movzwl	4(%esp), %eax
	imull	$63551, %eax, %eax      # imm = 0xF83F
	shrl	$21, %eax
	ret

instead of:

test1:                                  # @test1
        movw    $-1985, %ax             # imm = 0xFFFFFFFFFFFFF83F
        mulw    4(%esp)
        andl    $65504, %edx            # imm = 0xFFE0
        movl    %edx, %eax
        shrl    $5, %eax
        ret

Implementing rdar://8760399 and example #4 from:
http://blog.regehr.org/archives/320

We should implement the same thing for [su]mul_hilo, but I don't
have immediate plans to do this.

llvm-svn: 121696
2010-12-13 08:39:01 +00:00
..
CMakeLists.txt Removed a bunch of unnecessary target_link_libraries. 2010-09-28 22:39:14 +00:00
DAGCombiner.cpp Add a couple dag combines to transform mulhi/mullo into a wider multiply 2010-12-13 08:39:01 +00:00
FastISel.cpp If dbg_declare() or dbg_value() is not lowered by isel then emit DEBUG message instead of creating DBG_VALUE for undefined value in reg0. 2010-12-06 22:39:26 +00:00
FunctionLoweringInfo.cpp Reapply r112623. Included additional check for unused byval argument. 2010-08-31 22:22:42 +00:00
InstrEmitter.cpp Reword comment slightly. 2010-12-08 22:21:42 +00:00
InstrEmitter.h Don't set kill flags for instructions which the scheduler has cloned. 2010-05-14 22:01:14 +00:00
LegalizeDAG.cpp Initial support for nested CALLSEQ_START/CALLSEQ_END constructs in LegalizeDAG. 2010-12-09 21:25:20 +00:00
LegalizeFloatTypes.cpp PR5207: Rename overloaded APInt methods set(), clear(), flip() to 2010-12-01 08:53:58 +00:00
LegalizeIntegerTypes.cpp PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and 2010-12-07 08:25:19 +00:00
LegalizeTypes.cpp Renaming ISD::BIT_CONVERT to ISD::BITCAST to better reflect the LLVM IR concept. 2010-11-23 03:31:01 +00:00
LegalizeTypes.h Renaming ISD::BIT_CONVERT to ISD::BITCAST to better reflect the LLVM IR concept. 2010-11-23 03:31:01 +00:00
LegalizeTypesGeneric.cpp Renaming ISD::BIT_CONVERT to ISD::BITCAST to better reflect the LLVM IR concept. 2010-11-23 03:31:01 +00:00
LegalizeVectorOps.cpp Renaming ISD::BIT_CONVERT to ISD::BITCAST to better reflect the LLVM IR concept. 2010-11-23 03:31:01 +00:00
LegalizeVectorTypes.cpp Renaming ISD::BIT_CONVERT to ISD::BITCAST to better reflect the LLVM IR concept. 2010-11-23 03:31:01 +00:00
Makefile make -fno-rtti the default unless a directory builds with REQUIRES_RTTI. 2010-01-24 20:43:08 +00:00
SDNodeDbgValue.h Merge System into Support. 2010-11-29 18:16:10 +00:00
SDNodeOrdering.h Allow 0 as an order number. Don't assign an order to formal arguments. 2009-12-22 21:35:02 +00:00
ScheduleDAGFast.cpp Make fast scheduler handle asm clobbers correctly. 2010-08-17 22:17:24 +00:00
ScheduleDAGList.cpp Trim #include. 2010-05-26 00:55:59 +00:00
ScheduleDAGRRList.cpp Two sets of changes. Sorry they are intermingled. 2010-11-03 00:45:17 +00:00
ScheduleDAGSDNodes.cpp Two sets of changes. Sorry they are intermingled. 2010-11-03 00:45:17 +00:00
ScheduleDAGSDNodes.h Teach if-converter to be more careful with predicating instructions that would 2010-09-10 01:29:16 +00:00
SelectionDAG.cpp Catch attempts to remove a deleted node from the CSE maps. Better to 2010-12-12 13:22:50 +00:00
SelectionDAGBuilder.cpp reduce indentation by using continue, no functionality change. 2010-12-13 01:11:17 +00:00
SelectionDAGBuilder.h When isel is emitting instructions for an x86 target without CMOV, the CFG is 2010-09-30 19:44:31 +00:00
SelectionDAGISel.cpp Check for _setjmp too, because it's also used. 2010-11-20 00:03:09 +00:00
SelectionDAGPrinter.cpp Eliminate unnecessary empty string literals. 2010-08-04 01:39:08 +00:00
TargetLowering.cpp PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and 2010-12-07 08:25:19 +00:00
TargetSelectionDAGInfo.cpp Implement a bunch more TargetSelectionDAGInfo infrastructure. 2010-05-11 17:31:57 +00:00