[PATCH] D41335: [InlineFunction] Inline vararg functions that do not access varargs.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 5 08:56:18 PST 2018

fhahn added inline comments.

Comment at: test/Transforms/Inline/inline-varargs.ll:18
+; CHECK-LABEL: define void @thunk_caller(i8* %p)
+; CHECK: call void (i8*, ...) bitcast (void (i8*, i32)* @ext_method to void (i8*, ...)*)(i8* %this_adj.i, i32 42)
fhahn wrote:
> fhahn wrote:
> > rnk wrote:
> > > I was hoping instcombine would simplify this to `call void @ext_method(i8* %this_adj.i, i32 42)`. I hope there's no reason we can't and that instcombine just hasn't been taught how to do it yet, but let's leave a FIXME comment here for it.
> > I'll check!
> I've opened D41633, which should address the issue.
If the definition of `ext_method` is visible, instcombine can remove the cast (rL321706). If the definition is not visible, then removing the cast might not be save, after discussion in D41633.


More information about the llvm-commits mailing list