]> git.ipfire.org Git - thirdparty/gcc.git/commit
rs6000: Skip empty inline asm in rs6000_update_ipa_fn_target_info [PR111366]
authorKewen Lin <linkw@linux.ibm.com>
Mon, 25 Sep 2023 05:28:19 +0000 (00:28 -0500)
committerKewen Lin <linkw@linux.ibm.com>
Mon, 25 Sep 2023 05:28:19 +0000 (00:28 -0500)
commita65b38e361320e0aa45adbc969c704385ab1f45b
treec873e2c6311c4483a8c98d1fccda514c7408855a
parent266dfed68b881702e9660889f63408054b7fa9c0
rs6000: Skip empty inline asm in rs6000_update_ipa_fn_target_info [PR111366]

PR111366 exposes one thing that can be improved in function
rs6000_update_ipa_fn_target_info is to skip the given empty
inline asm string, since it's impossible to adopt any
hardware features (so far HTM).

Since this rs6000_update_ipa_fn_target_info related approach
exists in GCC12 and later, the affected project highway has
updated its target pragma with ",htm", see the link:
https://github.com/google/highway/commit/15e63d61eb535f478bc
I'd not bother to consider an inline asm parser for now but
will file a separated PR for further enhancement.

PR target/111366

gcc/ChangeLog:

* config/rs6000/rs6000.cc (rs6000_update_ipa_fn_target_info): Skip
empty inline asm.

gcc/testsuite/ChangeLog:

* g++.target/powerpc/pr111366.C: New test.
gcc/config/rs6000/rs6000.cc
gcc/testsuite/g++.target/powerpc/pr111366.C [new file with mode: 0644]