[all-commits] [llvm/llvm-project] 6c0a2c: [x86] enhance mayFoldLoad to check alignment

RotateRight via All-commits all-commits at lists.llvm.org
Wed Oct 27 04:54:37 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6c0a2c2804c04064b723f7663928621d95cac28f
      https://github.com/llvm/llvm-project/commit/6c0a2c2804c04064b723f7663928621d95cac28f
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-10-27 (Wed, 27 Oct 2021)

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

  Log Message:
  -----------
  [x86] enhance mayFoldLoad to check alignment

As noted in D112464, a pre-AVX target may not be able to 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.

Differential Revision: https://reviews.llvm.org/D112545




More information about the All-commits mailing list