[PATCH] D45146: [x86] Introduce a pass to begin more systematically fixing PR36028 and similar issues.
Chandler Carruth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 3 03:53:08 PDT 2018
chandlerc marked 2 inline comments as done.
chandlerc added a comment.
Last major issue I'm aware of with this patch addressed (see below). I think this is ready for another round of review.
================
Comment at: llvm/lib/Target/X86/X86FlagsCopyLowering.cpp:403
+ //
+ // FIXME: handle conditional tail calls
+ if (X86::getCondFromBranchOpc(MI.getOpcode()) != X86::COND_INVALID) {
----------------
chandlerc wrote:
> rnk wrote:
> > This might need to be addressed before committing.
> Amazingly, I have found no test case that hits this. But yes, we need to handle this.
>
> I'm going to work on crafting a MIR test case to hit this and then will fix it.
Turns out to not be amazing at all.
We don't form conditional tail calls until post-RA and we form them out of conditional branches. So by fixing conditional branches here we get conditional tail calls to use this lowering. I've added a test to copy-eflags.ll which actually forms a conditional tail call in the end and it passes and in fact uses very nice lowering. =D
I've updated this comment to reflect what is going on here as it is a surprising detail to realize here.
Repository:
rL LLVM
https://reviews.llvm.org/D45146
More information about the llvm-commits
mailing list