HomePhabricator

[SLP] Don't vectorize loads of non-packed types (like i1, i2).

Description

[SLP] Don't vectorize loads of non-packed types (like i1, i2).

Summary:
Given an array of i2 elements, 4 consecutive scalar loads will be lowered to
i8-sized loads and thus will access 4 consecutive bytes in memory. If we
vectorize these loads into a single <4 x i2> load, it'll access only 1 byte in
memory. Hence, we should prohibit vectorization in such cases.

PS: Initial patch was proposed by Arnold.

Reviewers: aschwaighofer, nadav, hfinkel

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D13277

Details

Committed
mzolotukhinSep 30 2015, 2:05 PM
Differential Revision
D13277: [SLP] Don't vectorize loads of non-packed types (like i1, i2).
Parents
rL248942: Fix -Wsign-compare warning
Branches
Unknown
Tags
Unknown