[PATCH] D112545: [x86] enhance mayFoldLoad to check alignment

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 26 08:08:44 PDT 2021


spatel created this revision.
spatel added reviewers: craig.topper, pengfei, RKSimon, lebedev.ri.
Herald added subscribers: hiraditya, mcrosier.
spatel requested review of this revision.
Herald added a project: LLVM.

As noted in D112464 <https://reviews.llvm.org/D112464>, a pre-AVX target can't fold an under-aligned vector load into another op, so we shouldn't report that as a load folding candidate. I only found one caller where this would make a difference -- combineCommutableSHUFP() -- so that's where I added a test to show the (minor) regression.


https://reviews.llvm.org/D112545

Files:
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/X86/oddshuffles.ll
  llvm/test/CodeGen/X86/vec_insert-5.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112545.382320.patch
Type: text/x-patch
Size: 13140 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211026/acfb8f56/attachment.bin>


More information about the llvm-commits mailing list