[PATCH] D80370: [CodeGen] Make CreateStackTemporary choose better alignments

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 21 03:13:13 PDT 2020


david-arm created this revision.
david-arm added a reviewer: sdesmalen.
Herald added subscribers: llvm-commits, kerbowa, dmgreen, arphaman, hiraditya, kristof.beyls, nhaehnle, jvesely, qcolombet.
Herald added a project: LLVM.

In CreateStackTemporary we were promoting alignments beyond the
stack alignment for illegal vector types, which I have fixed in
this patch. I have added a new function:

  getReducedABIAlign

the returns the reduced ABI alignment for broken down vector
types in cases where the original type was illegal. In order
to avoid unnecessarily large stack alignments (and improve
code quality) I have also added code to only allow the preferred
alignment being used in cases where it exceeds the ABI alignment,
but does not exceed the stack alignment.

I added a test to

  CodeGen/AArch64/build-one-lane.ll

that tries to insert an element into an illegal fixed vector type
that involves creating a temporary stack object.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80370

Files:
  llvm/include/llvm/CodeGen/SelectionDAG.h
  llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  llvm/test/CodeGen/AArch64/build-one-lane.ll
  llvm/test/CodeGen/AMDGPU/scratch-simple.ll
  llvm/test/CodeGen/AMDGPU/vgpr-spill-emergency-stack-slot.ll
  llvm/test/CodeGen/ARM/combine-vmovdrr.ll
  llvm/test/CodeGen/ARM/vdup.ll
  llvm/test/CodeGen/ARM/vstlane.ll
  llvm/test/CodeGen/Thumb2/2013-03-02-vduplane-nonconstant-source-index.ll
  llvm/test/CodeGen/Thumb2/mve-shuffle.ll
  llvm/test/CodeGen/X86/atomic-fp.ll
  llvm/test/CodeGen/X86/atomic-load-store-wide.ll
  llvm/test/CodeGen/X86/atomic-mi.ll
  llvm/test/CodeGen/X86/atomic64.ll
  llvm/test/CodeGen/X86/avx512-insert-extract.ll
  llvm/test/CodeGen/X86/avx512-intrinsics-fast-isel.ll
  llvm/test/CodeGen/X86/cmov-fp.ll
  llvm/test/CodeGen/X86/deopt-bundles.ll
  llvm/test/CodeGen/X86/extractelement-fp.ll
  llvm/test/CodeGen/X86/extractelement-index.ll
  llvm/test/CodeGen/X86/fast-isel-fneg.ll
  llvm/test/CodeGen/X86/fast-isel-int-float-conversion.ll
  llvm/test/CodeGen/X86/fast-isel-uint-float-conversion.ll
  llvm/test/CodeGen/X86/fp-strict-scalar-inttofp.ll
  llvm/test/CodeGen/X86/fp-strict-scalar-round.ll
  llvm/test/CodeGen/X86/fp-strict-scalar.ll
  llvm/test/CodeGen/X86/fp80-strict-scalar.ll
  llvm/test/CodeGen/X86/i64-mem-copy.ll
  llvm/test/CodeGen/X86/insertelement-var-index.ll
  llvm/test/CodeGen/X86/mmx-fold-zero.ll
  llvm/test/CodeGen/X86/neg_fp.ll
  llvm/test/CodeGen/X86/powi.ll
  llvm/test/CodeGen/X86/scalar-int-to-fp.ll
  llvm/test/CodeGen/X86/sse-fcopysign.ll
  llvm/test/CodeGen/X86/sse-load-ret.ll
  llvm/test/CodeGen/X86/sse2-intrinsics-fast-isel.ll
  llvm/test/CodeGen/X86/var-permute-128.ll
  llvm/test/CodeGen/X86/vec-strict-128.ll
  llvm/test/CodeGen/X86/vec_insert-4.ll
  llvm/test/CodeGen/X86/vector-extend-inreg.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80370.265465.patch
Type: text/x-patch
Size: 174451 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200521/8c9953e0/attachment-0001.bin>


More information about the llvm-commits mailing list