diff options
author | Yang Yujie <yangyujie@loongson.cn> | 2025-08-06 12:04:51 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2025-08-06 12:04:51 +0200 |
commit | ed1ee2311721124c53070f9fdb15071664b6da65 (patch) | |
tree | 38924cd41fcb7ce5a6beb4746674038040c91e0d /libjava/classpath/lib/java/security | |
parent | 94d2bc6d08caad947a8897a538f2a9b64e16a11a (diff) | |
download | gcc-ed1ee2311721124c53070f9fdb15071664b6da65.zip gcc-ed1ee2311721124c53070f9fdb15071664b6da65.tar.gz gcc-ed1ee2311721124c53070f9fdb15071664b6da65.tar.bz2 |
bitint: Do not optimize away conversion to _BitInt before a VCE
A _BitInt value may rely on a conversion to become properly extended.
So a conversion to _BitInt is not trivially removable even if the
types of the result and the operand have the same precision and size.
This patch fixes gcc.dg/torture/bitint-64.c at -O2 on LoongArch,
which fails because extension of the result is dropped in a
compare-and-swap loop generated for incrementing an _Atomic _BitInt,
causing an ABI violation.
* match.pd: Preserve conversion to _BitInt before a VCE
if the _BitInt is extended.
* gcc.dg/torture/bitint-84.c: New test.
Diffstat (limited to 'libjava/classpath/lib/java/security')
0 files changed, 0 insertions, 0 deletions