diff options
| author | Nadav Rotem <nrotem@apple.com> | 2013-05-03 17:42:55 +0000 | 
|---|---|---|
| committer | Nadav Rotem <nrotem@apple.com> | 2013-05-03 17:42:55 +0000 | 
| commit | 4ce060b3da6b64c44e4d22b4a1a2111276ada553 (patch) | |
| tree | 00e502355a53007e8ea498207b9c6d1f25100627 /llvm/test/Transforms/LoopVectorize/ptr_loops.ll | |
| parent | 4489b85f2b2487f25778053d4dcbc05bbf83fbb5 (diff) | |
| download | bcm5719-llvm-4ce060b3da6b64c44e4d22b4a1a2111276ada553.tar.gz bcm5719-llvm-4ce060b3da6b64c44e4d22b4a1a2111276ada553.zip | |
LoopVectorizer: Add support for if-conversion of PHINodes with 3+ incoming values.
By supporting the vectorization of PHINodes with more than two incoming values we can increase the complexity of nested if statements.
We can now vectorize this loop:
int foo(int *A, int *B, int n) {
  for (int i=0; i < n; i++) {
    int x = 9;
    if (A[i] > B[i]) {
      if (A[i] > 19) {
        x = 3;
      } else if (B[i] < 4 ) {
        x = 4;
      } else {
        x = 5;
      }
    }
    A[i] = x;
  }
}
llvm-svn: 181037
Diffstat (limited to 'llvm/test/Transforms/LoopVectorize/ptr_loops.ll')
0 files changed, 0 insertions, 0 deletions

