llvm-6502/lib
Chris Lattner de1c3605a6 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.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121696 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-13 08:39:01 +00:00
..
Analysis Remove useless dynamic_cast<>(). 2010-12-12 21:58:28 +00:00
Archive Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with error_code &ec. And fix clients. 2010-12-09 17:36:48 +00:00
AsmParser Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with error_code &ec. And fix clients. 2010-12-09 17:36:48 +00:00
Bitcode
CodeGen Add a couple dag combines to transform mulhi/mullo into a wider multiply 2010-12-13 08:39:01 +00:00
CompilerDriver
ExecutionEngine Remove unneeded zero arrays. 2010-12-04 15:28:22 +00:00
Linker Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with error_code &ec. And fix clients. 2010-12-09 17:36:48 +00:00
MC Thumb unconditional branch binary encoding. rdar://8754994 2010-12-10 18:21:33 +00:00
Object Mach-O: Tweak field name. 2010-12-10 06:19:39 +00:00
Support Support/Windows/PathV2: Fix header comment. 2010-12-09 17:37:42 +00:00
Target Disable auto-detection of AVX support since AVX codegen support is not ready. 2010-12-13 04:23:53 +00:00
Transforms reinstate my patch: the miscompile was caused by an inverted branch in the 2010-12-13 08:12:19 +00:00
VMCore Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with error_code &ec. And fix clients. 2010-12-09 17:36:48 +00:00
Makefile