https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70010
--- Comment #9 from Jiu Fu Guo <guojiufu at gcc dot gnu.org> --- Author: guojiufu Date: Mon Oct 28 09:46:15 2019 New Revision: 277506 URL: https://gcc.gnu.org/viewcvs?rev=277506&root=gcc&view=rev Log: [rs6000] PR70010, avoid no-vsx function to be inlined to vsx function In PR70010, a function is marked with target(no-vsx) to disable VSX code generation. To avoid VSX code generation, this function should not be inlined into VSX function. To fix the bug, in the current logic when checking whether the caller's ISA flags supports the callee's ISA flags, we just need to add a test that enforces that the caller's ISA flags match exactly the callee's flags, for those flags that were explicitly set in the callee. If caller without target attribute then using options from command line. Jiufu BR gcc/ 2019-10-16 Peter Bergner <berg...@linux.ibm.com> Jiufu Guo <guoji...@linux.ibm.com> PR target/70010 * config/rs6000/rs6000.c (rs6000_can_inline_p): Prohibit inlining if the callee explicitly disables some isa_flags the caller is using. gcc.testsuite/ 2019-10-16 Peter Bergner <berg...@linux.ibm.com> Jiufu Guo <guoji...@linux.ibm.com> PR target/70010 * gcc.target/powerpc/pr70010.c: New test. * gcc.target/powerpc/pr70010-1.c: New test. * gcc.target/powerpc/pr70010-2.c: New test. * gcc.target/powerpc/pr70010-3.c: New test. * gcc.target/powerpc/pr70010-4.c: New test. Added: branches/gcc-9-branch/gcc/testsuite/gcc.target/powerpc/pr70010-1.c branches/gcc-9-branch/gcc/testsuite/gcc.target/powerpc/pr70010-2.c branches/gcc-9-branch/gcc/testsuite/gcc.target/powerpc/pr70010-3.c branches/gcc-9-branch/gcc/testsuite/gcc.target/powerpc/pr70010-4.c branches/gcc-9-branch/gcc/testsuite/gcc.target/powerpc/pr70010.c Modified: branches/gcc-9-branch/gcc/ChangeLog branches/gcc-9-branch/gcc/config/rs6000/rs6000.c branches/gcc-9-branch/gcc/testsuite/ChangeLog