[PATCH] D29511: [X86]: Don't set a regmask on conditional tail calls (PR31257)

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 13:21:06 PST 2017


hans created this revision.

The regmask would cause analyses to think the conditional tail call clobbers registers. Specifically, Machine Copy Propagation would remove a copy instruction to %ecx before the tail call (see PR).

Since the tail call is conditional, registers are only clobbered if the condition is met, in which case control leaves the function so it doesn't matter. Therefore, model the instruction as not clobbering any registers.


https://reviews.llvm.org/D29511

Files:
  lib/Target/X86/X86InstrInfo.cpp
  test/CodeGen/X86/conditional-tailcall.ll
  test/CodeGen/X86/tail-call-conditional.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29511.87008.patch
Type: text/x-patch
Size: 5967 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170203/c04f918f/attachment.bin>


More information about the llvm-commits mailing list