[PATCH] D146749: [CodeGen] Fix nomerge attribute not working in tail calls.

Zequan Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 11:50:49 PDT 2023


zequanwu created this revision.
zequanwu added reviewers: hans, craig.topper, stuij.
Herald added subscribers: luke, frasercrmck, luismarques, apazos, sameer.abuasal, pengfei, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, kbarton, hiraditya, kristof.beyls, arichardson, nemanjai.
Herald added a project: All.
zequanwu requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, MaskRay.
Herald added a project: LLVM.

Previously, that attribute won't apply to tail calls. This fixes it.

For ARM, I only made the new MI to inherit the flag under `TCRETURNdi` and `TCRETURNri`, because that's the place tail calls got replaced. Not sure if there's any other place needed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146749

Files:
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
  llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/AArch64/nomerge.ll
  llvm/test/CodeGen/ARM/nomerge.ll
  llvm/test/CodeGen/LoongArch/nomerge.ll
  llvm/test/CodeGen/PowerPC/nomerge.ll
  llvm/test/CodeGen/RISCV/nomerge.ll
  llvm/test/CodeGen/SystemZ/nomerge.ll
  llvm/test/CodeGen/X86/nomerge.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146749.507842.patch
Type: text/x-patch
Size: 11378 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230323/c399d383/attachment.bin>


More information about the llvm-commits mailing list