On Mon, 27 Jul 2026, Roger Sayle wrote:

> 
> This patch resolves PR rtl-optimization/126276 which is a target-specific
> regression on CRIS, triggered by a recent RTL simplification improvement.
> The underlying problem is that cris.md's *cbranch<mode>4_btstrq1_<CC>
> accepts more machines modes than the define_insn it is lowering to.
> Fixed by adding the necessary modes to the *btst<mode> define_insn.
> 
> This change restores the ability to build a cross-compiler to cris-elf,
> and generates the same code for Jeff's reduced test case as previously.
> Tested by building an uber-tree to cris-elf from x86_64-pc-linux-gnu,
> with make and make -k check, with no new failures relative to a baseline
> that has the triggering simplify-rtx.cc change reverted.  Ok for mainline?
> 
> 
> 2026-07-27  Roger Sayle  <[email protected]>
> 
> gcc/ChangeLog
>         PR target/126276
>         * config/cris/cris.md (*btst<BWD><ZnNNZSET): Handle BWD modes,
>         not just SImode.
>         (*cbranch<mode>4_btstrq1_<CC>): Likewise.
>         (*cbranch<mode>4_btstqb0_<CC>): Likewise.
> 
> 
> Thanks in advance and sorry for the inconvenience.
> Roger
> --
> 
> 

I appreciate the effort and if it helps you, please commit, 
thanks.

I'm certainly not convinced the patch doesn't have flaws, but 
I'll take care of that when I get back to work in two weeks.

brgds, H-P

Reply via email to