[all-commits] [llvm/llvm-project] 979400: [ARM] Fix MVE gather/scatter merged gep offsets

David Green via All-commits all-commits at lists.llvm.org
Wed Jun 22 03:04:36 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 979400be7852e16ddb154ddefbff0cda7c566485
  Author: David Green <david.green at arm.com>
  Date:   2022-06-22 (Wed, 22 Jun 2022)

  Changed paths:
    M llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
    M llvm/test/CodeGen/Thumb2/mve-gather-ind16-scaled.ll
    M llvm/test/CodeGen/Thumb2/mve-gather-ind32-scaled.ll
    M llvm/test/CodeGen/Thumb2/mve-gather-ptrs.ll
    M llvm/test/CodeGen/Thumb2/mve-gather-scatter-ptr-address.ll
    M llvm/test/CodeGen/Thumb2/mve-scatter-ind16-scaled.ll
    M llvm/test/CodeGen/Thumb2/mve-scatter-ind32-scaled.ll

  Log Message:
  [ARM] Fix MVE gather/scatter merged gep offsets

This fixes the combining of constant vector GEP operands in the
optimization of MVE gather/scatter addresses, when opaque pointers are
enabled. As opaque pointers reduce the number of bitcasts between geps,
more can be folded than before. This can cause problems if the index
types are now different between the two geps.

This fixes that by making sure each constant is scaled appropriately,
which has the effect of transforming the geps to have a scale of 1,
changing [r0, q0, uxtw #1] gathers to [r0, q0] with a larger q0. This
helps use a simpler instruction that doesn't need the extra uxtw.

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

More information about the All-commits mailing list