https://bugs.llvm.org/show_bug.cgi?id=36313

Jonas Hahnfeld <hah...@hahnjo.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WONTFIX                     |---
             Status|RESOLVED                    |REOPENED

--- Comment #17 from Jonas Hahnfeld <hah...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to