[PATCH] D52238: [CodeGen] Enable tail calls for functions with NonNull attributes.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 20 12:58:11 PDT 2018
efriedma added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:63
.removeAttribute(Attribute::NoAlias)
+ .removeAttribute(Attribute::NonNull)
.hasAttributes())
----------------
dmgreen wrote:
> efriedma wrote:
> > Test coverage for this change? (This codepath is primarily used by SelectionDAGLegalize::ExpandLibCall, so probably unlikely to be relevant in practice, but it should be possible to construct a synthetic testcase.)
> My understanding is that we need an intrinsic that returns a ptr and is lowered to a call. Any idea what that might be? I had a look round and couldn't find anything, and an assert that RetTy isn't a pointer type didn't throw up anything in the test suite.
You don't actually need an intrinsic that returns pointer; you can just take an intrinsic that returns an int and use inttoptr on the result.
https://reviews.llvm.org/D52238
More information about the llvm-commits
mailing list