[llvm-bugs] [Bug 31257] -Oz miscompilation due to conditional tail calls and machine copy propagation
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Feb 7 13:01:04 PST 2017
https://llvm.org/bugs/show_bug.cgi?id=31257
Hans Wennborg <hans at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |qcolombet at apple.com
Resolution|--- |FIXED
Summary|-Oz miscompilation? |-Oz miscompilation due to
| |conditional tail calls and
| |machine copy propagation
--- Comment #8 from Hans Wennborg <hans at chromium.org> ---
I have reverted the conditional tail call functionality until we figure out how
to solve this properly: r294348
I'll merge that to 4.0 once it's baked for a bit.
Quentin: Me and Michael discussed this a little on
https://reviews.llvm.org/D29511. The problem is how to model conditional tail
calls.
Currently, they are modeled as a regular tail call (isCall and isReturn, etc.)
and also as a branch (isBranch).
The problem is that treating them as a call can imply that they clobber
caller-saved registers. But they only do that if their condition is true.
So perhaps they should not be modelled as calls, but just returns.
And if we do that, why should regular tail calls be modelled as calls? They're
more like special returns anyway.
Does this sound reasonable to you? Could there be any unintended consequences?
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170207/615dc3c2/attachment.html>
More information about the llvm-bugs
mailing list