In PR70010, a function is marked with target(no-vsx) to disable VSX code generation.
authorPeter Bergner <bergner@linux.ibm.com>
Wed, 16 Oct 2019 13:35:41 +0000 (13:35 +0000)
committerJiufu Guo <guojiufu@gcc.gnu.org>
Wed, 16 Oct 2019 13:35:41 +0000 (13:35 +0000)
commit1624d351f14049bfe08bc2c86c63a9cccfb43ab8
tree10b462439e9e18a577c0a2b016773bbfc30a7650
parent50425706ad8808bba6c062fd5ed1fe88676821d4
In PR70010, a function is marked with target(no-vsx) to disable VSX code generation.

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.

gcc/
2019-10-16  Peter Bergner <bergner@linux.ibm.com>
    Jiufu Guo  <guojiufu@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 <bergner@linux.ibm.com>
    Jiufu Guo  <guojiufu@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.

Co-Authored-By: Jiufu Guo <guojiufu@linux.ibm.com>
From-SVN: r277065
gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/pr70010-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/pr70010-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/pr70010-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/pr70010-4.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/pr70010.c [new file with mode: 0644]