[llvm-bugs] [Bug 36313] [AArch64] Incorrect RETURN_ADDRESS in tests
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Feb 10 00:39:51 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=36313
Jonas Hahnfeld <hahnjo at hahnjo.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|WONTFIX |---
Status|RESOLVED |REOPENED
--- Comment #17 from Jonas Hahnfeld <hahnjo at hahnjo.de> ---
(In reply to Amara Emerson from comment #16)
> Ok this isn't really a bug, this is a code generation difference between
> using SelectionDAG and FastISel. GlobalISel is only involved indirectly,
> since at -O0 GISel replaces FastISel and falls back to SelectionDAG, whereas
> before FastISel would handle the block with the inline ASM and not fall back
> to SDAG.
>
> FastISel has some specialized code in FastISel.cpp:fastEmitBranch() that
> will check if the successor block is the target of the unconditional branch,
> in which case it will not emit anything. SelectionDAG doesn't do that, so
> when GlobalISel gives up on the block, instead of trying FastISel, we fall
> back to SDAG and end up with the extra branch.
Ok, this is the answer to "why do we have branches". But it doesn't explain why
GlobalISel falls back at all.
> This is expected behavior in terms of falling back to SDAG, so I think the test > needs to be updated to handle this new codegen.
As said yesterday I don't think it's possible to do this reliably. And I'd
argue that the generated code, while correct, doesn't make any sense.
--
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/20180210/50743fc3/attachment.html>
More information about the llvm-bugs
mailing list