[SelectionDAG] Propagate scoped AA metadata when lowering mem intrinsics.
authorMichael Liao <michael.hliao@gmail.com>
Thu, 6 May 2021 05:10:28 +0000 (01:10 -0400)
committerMichael Liao <michael.hliao@gmail.com>
Tue, 25 May 2021 18:42:26 +0000 (14:42 -0400)
commitc9dd29925f0c27cb59700b9933c41360d21350d3
tree7953dc58500a0b941f3ecf6f799c78459a69275d
parent4df3b60199ef80dfbd84c8cee8c8afd511443330
[SelectionDAG] Propagate scoped AA metadata when lowering mem intrinsics.

- When memory intrinsics, such as memcpy, the attached scoped AA
  metadata is not passed down to the backend. As a result, the backend
  cannot schedule relevant memory operations around them following that
  hint. In this patch, SelectionDAG is enhanced to propagate that
  metadata (scoped AA only) when they are lowered into loads and stores.

Differential Revision: https://reviews.llvm.org/D102215
llvm/include/llvm/CodeGen/SelectionDAG.h
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/test/CodeGen/AArch64/memcpy-scoped-aa.ll
llvm/test/CodeGen/AMDGPU/memcpy-scoped-aa.ll
llvm/test/CodeGen/X86/memcpy-scoped-aa.ll