[PATCH] D41096: [X86] Initial support for prefer-vector-width function attribute

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 11 16:52:00 PST 2017


craig.topper added a comment.

The loop vectorizer definitely creates wider vectors even though its told not to.

For one it only considers the scalar types of loads, stores, and phis when determining the VF factor. So if all your loads/stores use i32, but some operations like compares or address calculations use i64 types due to zext/sext, the vectorizer doesn't see them when determining VF. I don't know enough about the vectorizer to say if that should be fixed or not.

There also the interleaved load/store optimization in the vector that very deliberately creates large loads, stores, and shuffles.

Good point on the ABI requirements.


https://reviews.llvm.org/D41096





More information about the llvm-commits mailing list