From 0e3007a4cf90ee13a24d7df14cb552f44f04ef3c Mon Sep 17 00:00:00 2001 From: Alp Sayin Date: Fri, 18 Oct 2024 17:29:16 +0100 Subject: [PATCH] microblaze: Fix -Os right shift optimization is allowed into delay slot In picolibc testing it's found that this produces code that compiler squeezes into a single delay slot. And thus only the first instruction emitted by this optimization is run and the rest is skipped. Signed-off-by: Alp Sayin --- gcc/config/microblaze/microblaze.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md index 7a7c70d607b8f..69774503083ba 100644 --- a/gcc/config/microblaze/microblaze.md +++ b/gcc/config/microblaze/microblaze.md @@ -2286,7 +2286,7 @@ else output_asm_insn ("bneid\t%3,.-4", operands); return "sra\t%0,%0"; } - [(set_attr "type" "arith") + [(set_attr "type" "multi") (set_attr "mode" "SI") (set_attr "length" "20")] )