Go to file
Tobias Grosser cb73f150d4 Translate power-of-two floor-division into ashr
Power-of-two floor divisions can be translated into an arithmetic shift
operation. This allows us to replace a complex lowering that requires division
operations:

  %pexp.fdiv_q.0 = sub i64 %21, 128
  %pexp.fdiv_q.1 = add i64 %pexp.fdiv_q.0, 1
  %pexp.fdiv_q.2 = icmp slt i64 %21, 0
  %pexp.fdiv_q.3 = select i1 %pexp.fdiv_q.2, i64 %pexp.fdiv_q.1, i64 %21
  %pexp.fdiv_q.4 = sdiv i64 %pexp.fdiv_q.3, 128

with a simple ashr:

  %polly.fdiv_q.shr = ashr i64 %21, 7

llvm-svn: 238905
2015-06-03 06:31:30 +00:00
clang Revert "add the -mrecip driver flag and process its options (2nd try)" 2015-06-03 05:44:28 +00:00
clang-tools-extra Update for clang API change. 2015-06-01 20:00:20 +00:00
compiler-rt Tests: disable test of /proc filesystem on Darwin. 2015-06-02 21:59:04 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Use a more accurate implementation for exp 2015-05-13 03:55:09 +00:00
libcxx Revert changes inadvertantly committed 2015-06-02 22:26:29 +00:00
libcxxabi Implement uncaught_exceptions() to get a count, rather than a bool. Update the libc++abi version. Reviewed as http://reviews.llvm.org/D10067 2015-06-02 13:03:17 +00:00
libunwind Code cleanup: Reindent statements. 2015-05-30 14:00:39 +00:00
lld COFF: Update README. 2015-06-03 05:39:13 +00:00
lldb Fixed "format-string" based settings so they can have quotes on them without leaving the quotes in the format string: 2015-06-03 02:02:48 +00:00
llgo [llgo] cmd/llgoi: use line editor 2015-05-23 15:16:09 +00:00
llvm This reverts commit r238838, r238844 and r238888. 2015-06-03 05:39:59 +00:00
openmp Get rid of some dead code. 2015-06-02 22:21:37 +00:00
polly Translate power-of-two floor-division into ashr 2015-06-03 06:31:30 +00:00