[all-commits] [llvm/llvm-project] 2e25d7: [AArch64][GlobalISel] Fix llvm.returnaddress(0) se...

AE via All-commits all-commits at lists.llvm.org
Tue Jan 21 22:54:04 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e25d75aaa2280c3128c8dd6349f8b605207b94d
      https://github.com/llvm/llvm-project/commit/2e25d75aaa2280c3128c8dd6349f8b605207b94d
  Author: Amara Emerson <aemerson at apple.com>
  Date:   2020-01-21 (Tue, 21 Jan 2020)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/select-returnaddr.ll

  Log Message:
  -----------
  [AArch64][GlobalISel] Fix llvm.returnaddress(0) selection when LR is clobbered.

The code was originally ported from SelectionDAG, which does CSE behind the scenes
automatically. When copying the return address from LR live into the function, we
need to make sure to use the single copy on function entry. Any later copy from LR
could be using clobbered junk.

Implement this by caching the copy in the per-MF state in the selector.

Should hopefully fix the AArch64 sanitiser buildbot failure.




More information about the All-commits mailing list