[all-commits] [llvm/llvm-project] 53c0e8: [SROA] Use !tbaa instead of !tbaa.struct if op mat...

Florian Hahn via All-commits all-commits at lists.llvm.org
Fri Feb 16 05:45:13 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 53c0e809faacfffce097c7d220836f4f41b3979a
      https://github.com/llvm/llvm-project/commit/53c0e809faacfffce097c7d220836f4f41b3979a
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2024-02-16 (Fri, 16 Feb 2024)

  Changed paths:
    M clang/test/CodeGen/aarch64-ABI-align-packed.c
    M llvm/include/llvm/IR/Metadata.h
    M llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
    M llvm/lib/Transforms/Scalar/SROA.cpp
    M llvm/test/Transforms/SROA/tbaa-struct2.ll
    M llvm/test/Transforms/SROA/tbaa-struct3.ll

  Log Message:
  -----------
  [SROA] Use !tbaa instead of !tbaa.struct if op matches field. (#81289)

If a split memory access introduced by SROA accesses precisely a single
field of the original operation's !tbaa.struct, use the !tbaa tag for
the accessed field directly instead of the full !tbaa.struct.

InstCombine already had a similar logic.

Motivation for this and follow-on patches is to improve codegen for
libc++, where using memcpy limits optimizations, like vectorization for
code iteration over std::vector<std::complex<float>>:
https://godbolt.org/z/f3vqYos3c

Depends on https://github.com/llvm/llvm-project/pull/81285.




More information about the All-commits mailing list