On Fri, Jun 27, 2025 at 03:33:37PM +0800, Yang Yujie wrote: > 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 patches 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. > > gcc/ChangeLog: > > * match.pd: Preserve conversion to _BitInt before a VCE > if the _BitInt is extended.
Ok for trunk. Though, a bitintext.h infrastructure test without atomics that FAILs without this change and passes with it would be really appreciated. Jakub