From 28f4ff35247bb085d5de9816c6ced4dc4e14269e Mon Sep 17 00:00:00 2001 From: Claudiu Zissulescu Date: Thu, 31 Aug 2017 16:35:47 +0200 Subject: [PATCH] [ARC] Update can_follow_jump hook helper. Short branches cannot be used to jump between hot/cold sections. Update the hook. gcc/ 2017-04-26 Claudiu Zissulescu * config/arc/arc.c (arc_can_follow_jump): Check for short branches. From-SVN: r251566 --- gcc/ChangeLog | 5 +++++ gcc/config/arc/arc.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c0e032b1a77..cf1e005c158 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-08-31 Claudiu Zissulescu + + * config/arc/arc.c (arc_can_follow_jump): Check for short + branches. + 2017-08-31 Claudiu Zissulescu * config.gcc: Use g.opt for arc. diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index 4dcac1892a7..bc73a591fa4 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -9845,6 +9845,9 @@ arc_can_follow_jump (const rtx_insn *follower, const rtx_insn *followee) if (CROSSING_JUMP_P (followee)) switch (get_attr_type (u.r)) { + case TYPE_BRANCH: + if (get_attr_length (u.r) != 2) + break; case TYPE_BRCC: case TYPE_BRCC_NO_DELAY_SLOT: return false; -- 2.30.2