[PATCH] D18680: ARM, AArch64, X86: Check preserved registers for tail calls.

Renato Golin via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 4 11:41:42 PDT 2016


rengolin added inline comments.

================
Comment at: lib/CodeGen/TargetRegisterInfo.cpp:395
@@ +394,3 @@
+  for (unsigned I = 0; I < N; ++I)
+    if ((mask0[I] & mask1[I]) != mask0[I])
+      return false;
----------------
MatzeB wrote:
> rengolin wrote:
> > IIUC, you need to check that all reserved registers on the left are also on the right, but not necessarily all on the right to be on the left, right? In that case, this check would be too restrictive, mostly matching recursive tail calls only, no?
> That's what the check is doing, isn't it?
> 
> | Bit0 | Bit1 | Bit0&Bit1 == Bit0
> | 0    |  0/1 |            1
> | 1    |   0  |            0
> | 1    |   1  |            1
> 
> Is there a clearer way to write the code?
Dang! It is, sorry, brain fart.


Repository:
  rL LLVM

http://reviews.llvm.org/D18680





More information about the llvm-commits mailing list