[VectorCombine] loosen alignment constraint for load transform
authorSanjay Patel <spatel@rotateright.com>
Wed, 16 Dec 2020 17:11:57 +0000 (12:11 -0500)
committerSanjay Patel <spatel@rotateright.com>
Wed, 16 Dec 2020 17:25:18 +0000 (12:25 -0500)
commitaaaf0ec72b062dea09a277e5b9e6bda0a3da55c9
tree443b8cf23414e72ef840963d6597f01b3650bd78
parent66bcbdbc9c584becff35f6795cd2836a7a0141b2
[VectorCombine] loosen alignment constraint for load transform

As discussed in D93229, we only need a minimal alignment constraint
when querying whether a hypothetical vector load is safe. We still
pass/use the potentially stronger alignment attribute when checking
costs and creating the new load.

There's already a test that changes with the minimum code change,
so splitting this off as a preliminary commit independent of any
gep/offset enhancements.

Differential Revision: https://reviews.llvm.org/D93397
llvm/lib/Transforms/Vectorize/VectorCombine.cpp
llvm/test/Transforms/VectorCombine/X86/load.ll