https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120375
Alex Turjan <aturjan at yahoo dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aturjan at yahoo dot com --- Comment #3 from Alex Turjan <aturjan at yahoo dot com> --- You're emulating a barrel shifter on ARC by emitting clobbers in the define_expand, which is a reasonable approach given the lack of native support. However, relying solely on clobbers may not be sufficient to ensure correct execution. The issue may appear due to instruction reordering that takes place during later compiler passes (e.g., scheduling or register allocation). To make the transformation more robust, consider emitting a parallel RTL expression in the define_expand that includes both the clobbers and the operation. This can be done using C code and ending the expansion with a DONE statement. The parallel ensures the compiler treats the clobbers and the operation as a single atomic unit, preserving the intended semantics. You can then write a corresponding define_insn to match this pattern. If you're interested in exploring this direction, we’d be happy to assist. Otherwise, we can take it from here and build on top of your contribution. Thanks again for your work on this!