[PATCH] D45216: [Attributes] Add IntrinsicLoweredToCall attribute.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 3 11:38:01 PDT 2018


efriedma added a comment.

I don't IntrLoweredToCall is the attribute you want.

There are some intrinsics which are essentially always lowered to calls.  But there are a lot of intrinsics which may or may not be lowered to a call, depending on the exact capabilities of the target.  For example, llvm.trunc.f32() is lowered to a single instruction on some processor variants, and a call to trunc() on others.  So it's not a fundamental property of the intrinsic; we have to actually query the target.  (Getting this right would probably be helpful for the inliner.)

That said, that isn't what you want when you're trying to deduce norecurse; you don't actually care whether the intrinsic is lowered to a call instruction, just whether the lowering calls another user-defined function.


https://reviews.llvm.org/D45216





More information about the llvm-commits mailing list