mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-18 22:38:56 +00:00
Fix vectorizer docs.
This example is not vectorized because LLVM does not prove no-wrapping of "a[i*7] += ...". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203734 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9a4d525b7d
commit
6a7d263e8b
@ -182,11 +182,14 @@ that scatter/gathers memory.
|
|||||||
|
|
||||||
.. code-block:: c++
|
.. code-block:: c++
|
||||||
|
|
||||||
int foo(int *A, int *B, int n, int k) {
|
int foo(int * A, int * B, int n) {
|
||||||
for (int i = 0; i < n; ++i)
|
for (intptr_t i = 0; i < n; ++i)
|
||||||
A[i*7] += B[i*k];
|
A[i] += B[i*4];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In many situations the cost model will inform LLVM that this is not beneficial
|
||||||
|
and LLVM will only vectorize such code if forced with "-mllvm -force-vector-width=#".
|
||||||
|
|
||||||
Vectorization of Mixed Types
|
Vectorization of Mixed Types
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user