[PATCH] D100591: [Clang][AArch64] Disable rounding of return values for AArch64
Andrew Savonichev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 15 14:33:10 PDT 2021
asavonic added a comment.
In D100591#2692599 <https://reviews.llvm.org/D100591#2692599>, @rjmccall wrote:
> I think the right thing to do here is to recognize generally that we're emitting a mandatory tail call, and so suppress *all* the normal transformations on the return value.
I assume it can be tricky to detect such call. The final decision (tail call vs normal call) is made before instruction selection, after all LLVM IR optimization passes. So we can miss tail calls that are not obvious on non-optimized code, or get false-positive results for calls that a backend decides to emit as normal calls.
In any case, this patch can be useful not only for tail calls: `trunc + zext` sequence generated to round a return value can be problematic for other cases as well.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100591/new/
https://reviews.llvm.org/D100591
More information about the cfe-commits
mailing list