https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127217
--- Comment #4 from Senthil Kumar Selvaraj <saaadhu at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #1) > evrp doesn't inline it. > It uses inter-procedural value range optimization, so knows callee will > return a value in range [1,1] and so can replace it with a constant. That > is not inlining. > If you want to avoid any IPA optimizations, you need to use the noipa > attribute to prevent those. Agreed, but at least for this specific case, the end result is indistinguishable from inlining :shrug: gcc.target/mips/mips16-attributes-5.c verifies if inlining is rejected for caller/callees with mismatched attributes, so can't use noipa to disable IPA entirely. Will modify the callee's body instead to do something that VRP can't optimize.
