Skip to content

Commit

Permalink
Add the last part that is needed for vectorization of if-converted code.
Browse files Browse the repository at this point in the history
Added the code that actually performs the if-conversion during vectorization.

We can now vectorize this code:

for (int i=0; i<n; ++i) {
  unsigned k = 0;

  if (a[i] > b[i])   <------ IF inside the loop.
    k = k * 5 + 3;

  a[i] = k;          <---- K is a phi node that becomes vector-select.
}



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169217 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
nadavrot committed Dec 4, 2012
1 parent 6c55412 commit 319d594
Show file tree
Hide file tree
Showing 2 changed files with 311 additions and 162 deletions.
Loading

0 comments on commit 319d594

Please sign in to comment.