https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103383
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |microblaze
Last reconfirmed| |2021-11-24
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I think this patch fixes the problem:
diff --git a/gcc/config/microblaze/microblaze.md
b/gcc/config/microblaze/microblaze.md
index 6d77752cbfd..ca4bd976a5c 100644
--- a/gcc/config/microblaze/microblaze.md
+++ b/gcc/config/microblaze/microblaze.md
@@ -372,7 +372,8 @@ (define_insn "bswaphi2"
"TARGET_REORDER"
"swapb %0, %1
swaph %0, %0"
-)
+ [(set_attr "length" "8")
+ (set_attr "type" "no_delay_arith")])
;;----------------------------------------------------------------
;; Microblaze delay slot description
---- CUT ----
The delay slot description is right below bswaphi2 definition even:
(define_delay (eq_attr "type" "branch,call,jump")
[(and (eq_attr "type"
"!branch,call,jump,icmp,multi,no_delay_arith,no_delay_load,no_delay_store,no_delay_imul,no_delay_move,darith")
(ior (not (match_test "microblaze_no_unsafe_delay"))
(eq_attr "type" "!fadd,frsub,fmul,fdiv,fcmp,store,load")
))
(nil) (nil)])
Or multi could be used instead of no_delay_arith.