[all-commits] [llvm/llvm-project] d48c98: SROA: Don't drop atomic load/store alignments (PR4...

Hans via All-commits all-commits at lists.llvm.org
Fri Feb 28 01:38:52 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d48c981697a49653efff9dd14fa692d99e6fa868
      https://github.com/llvm/llvm-project/commit/d48c981697a49653efff9dd14fa692d99e6fa868
  Author: Hans Wennborg <hans at chromium.org>
  Date:   2020-02-28 (Fri, 28 Feb 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/SROA.cpp
    M llvm/test/Transforms/SROA/alignment.ll

  Log Message:
  -----------
  SROA: Don't drop atomic load/store alignments (PR45010)

SROA will drop the explicit alignment on allocas when the ABI guarantees
enough alignment. Because the alignment on new load/store instructions
are set based on the alloca's alignment, that means SROA would end up
dropping the alignment from atomic loads and stores, which is not
allowed (see bug). For those, make sure to always carry over the
alignment from the previous instruction.

Differential revision: https://reviews.llvm.org/D75266




More information about the All-commits mailing list