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
..
2010-09-28 22:39:14 +00:00
2011-03-11 00:48:56 +00:00
2011-03-11 21:33:55 +00:00
2011-03-03 23:14:05 +00:00
2011-01-10 02:58:51 +00:00
2010-05-14 22:01:14 +00:00
2011-03-07 18:29:47 +00:00
2011-02-25 21:41:48 +00:00
2011-03-04 14:28:59 +00:00
2011-01-11 00:36:08 +00:00
2011-03-03 22:33:23 +00:00
2010-11-23 03:31:01 +00:00
2010-11-23 03:31:01 +00:00
2011-03-01 15:15:43 +00:00
2011-03-10 00:16:32 +00:00
2010-12-24 05:03:26 +00:00
2011-03-10 00:16:32 +00:00
2011-03-09 19:12:43 +00:00
2011-02-04 03:18:17 +00:00
2011-02-18 22:43:42 +00:00
2011-03-15 02:22:10 +00:00
2011-03-17 14:53:37 +00:00
2011-02-21 23:21:26 +00:00
2011-03-01 01:39:05 +00:00
2011-02-27 04:11:03 +00:00
2011-03-17 20:39:14 +00:00
2010-05-11 17:31:57 +00:00