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 | 4bcd5f888fa762613cf8096a79ba7b8a72665de2 (patch) | |
tree | 1dfc096d2c67d5b3fbf51252b403f5ce3ebede39 /lib/Linker/LinkModules.cpp | |
parent | 19301d5d1234d032d42f20deb6f3076c972fd5f4 (diff) |
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;
}
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181037 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker/LinkModules.cpp')
0 files changed, 0 insertions, 0 deletions