[PATCH] D70866: Improve SLP code snippet
Leonardo Sandoval via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 5 09:14:26 PST 2019
lsandov1 marked an inline comment as done.
lsandov1 added inline comments.
================
Comment at: llvm/docs/Vectorizers.rst:420
- void foo(int a1, int a2, int b1, int b2, int *A) {
- A[0] = a1*(a1 + b1)/b1 + 50*b1/a1;
- A[1] = a2*(a2 + b2)/b2 + 50*b2/a2;
+ void foo(long a1, long a2, long b1, long b2, long *A) {
+ A[0] = a1*(a1 + b1);
----------------
spatel wrote:
> I understand that integer division is a poor example for vectorization because most targets can't handle it.
> But what is the intent of changing 'int' to 'long' in this example? That change appears to prevent vectorization (for most x86 targets at least).
I was biased by AVX2 in my example (4 longs fits a ymm register) but agree that 'int' is less intrusive and more generic for the proposed code snippet. I will change it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70866/new/
https://reviews.llvm.org/D70866
More information about the llvm-commits
mailing list