Benjamin Kramer 1c10b8de46 BuildUDIV: If the divisor is even we can simplify the fixup of the multiplied value by introducing an early shift.
This allows us to compile "unsigned foo(unsigned x) { return x/28; }" into
	shrl	$2, %edi
	imulq	$613566757, %rdi, %rax
	shrq	$32, %rax
	ret

instead of
	movl    %edi, %eax
	imulq   $613566757, %rax, %rcx
	shrq    $32, %rcx
	subl    %ecx, %eax
	shrl    %eax
	addl    %ecx, %eax
	shrl    $4, %eax

on x86_64

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127829 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 20:39:14 +00:00
..
2011-03-11 21:52:04 +00:00
2011-01-16 18:02:57 +00:00
2011-03-09 22:07:31 +00:00
2011-03-08 20:19:10 +00:00
2011-01-16 18:02:57 +00:00
2011-03-10 00:25:53 +00:00
2011-01-01 21:58:41 +00:00
2011-02-16 01:08:31 +00:00
2011-03-11 21:52:04 +00:00
2011-03-11 21:52:04 +00:00
2011-03-11 21:52:04 +00:00
2011-01-16 18:02:57 +00:00
2011-03-11 21:52:04 +00:00
2011-02-20 12:37:50 +00:00
2011-01-28 03:57:55 +00:00
2011-03-11 21:52:04 +00:00