[PATCH] D43708: [DAE] don't remove args of musttail target/caller

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 10:34:27 PST 2018


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm with nit



================
Comment at: test/Transforms/DeadArgElim/musttail-caller.ll:6
+
+; CHECK-LABEL: define internal void @test(i32 %a, i32 %b)
+define internal void @test(i32 %a, i32 %b) {
----------------
indutny wrote:
> rnk wrote:
> > indutny wrote:
> > > rnk wrote:
> > > > Do we pass `undef` to the call? That would be correct. It doesn't matter what we pass, so long as we match the prototype.
> > > I'm not sure I got your comment. Do you want me to pass `undef` below?
> > No. Can you add CHECKs for the musttail call to show what arguments are passed here? I'm wondering if we get or miss that optimization. It is invalid to change the prototype of the foo, but it is valid to pass undef because the args are dead.
> I believe it is `musttail call void @foo(i32 %a, i32 0)`
Can you add a FIXME that we should replace these with undef?


https://reviews.llvm.org/D43708





More information about the llvm-commits mailing list