https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67954
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |vmakarov at gcc dot gnu.org --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Sounds like a RA issue to me. In *.ira we have: (jump_insn 175 174 176 26 (parallel [ (set (pc) (if_then_else (lt (plus:SI (reg/v:SI 134 [ runCount ]) (const_int -1 [0xffffffffffffffff])) (const_int 0 [0])) (label_ref 105) (pc))) (set (reg/v:SI 152 [ runCount ]) (plus:SI (reg/v:SI 134 [ runCount ]) (const_int -1 [0xffffffffffffffff]))) (clobber (scratch:SI)) ]) pr67954.i:89 759 {*addsi3_cbranch} (expr_list:REG_DEAD (reg/v:SI 134 [ runCount ]) (int_list:REG_BR_PROB 900 (nil))) -> 105) and then in *.reload we have: Choosing alt 4 in insn 175: (0) *?m (1) &l (2) 1 (3) lIJ {*addsi3_cbranch} ... Choosing alt 1 in insn 175: (0) l (1) X (2) l (3) lL {*addsi3_cbranch} ... Choosing alt 1 in insn 175: (0) l (1) X (2) l (3) lL {*addsi3_cbranch} ... Choosing alt 1 in insn 175: (0) l (1) X (2) l (3) lL {*addsi3_cbranch} ... (jump_insn 175 548 176 26 (parallel [ (set (pc) (if_then_else (lt (plus:SI (reg:SI 3 r3 [374]) (const_int -1 [0xffffffffffffffff])) (const_int 0 [0])) (label_ref 105) (pc))) (set (reg/v:SI 2 r2 [orig:152 runCount ] [152]) (plus:SI (reg:SI 3 r3 [374]) (const_int -1 [0xffffffffffffffff]))) (clobber (mem/c:SI (reg:SI 2 r2 [437]) [6 %sfp+-32 S4 A32])) ]) pr67954.i:89 759 {*addsi3_cbranch} (int_list:REG_BR_PROB 900 (nil)) -> 105) The pattern has (clobber (match_scratch:SI 1 "=X,X,l,l,&l,&l"))] If LRA really chooses the alt 1, then the match_scratch has =X constraint, but I would expect that it would not leave in complete garbage like the memory dereference that doesn't pass scratch_operand. Vlad? Note I could only reproduce this on the 5 branch.