https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64539
Bug ID: 64539
Summary: [5 regression] cprop_hardreg does not respect clobbers
in C_I_F_U
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: vries at gcc dot gnu.org
As discussed in PR64154 comment 2 and 3, the clobbers in
CALL_INSN_FUNCTION_USAGE are in general not registered by
copyprop_hardreg_forward_1.
F.i. in this thumb1 call insn there's a clobber of the ip reg, that is ignored
by cprop_hardreg:
...
(call_insn 141 292 142 13 (parallel [
(call (mem:SI (symbol_ref:SI ("f2") [flags 0x3] <function_decl
0x7f8182689100 f2>) [0 f2 S4 A32])
(const_int 0 [0]))
(use (const_int 0 [0]))
(clobber (reg:SI 14 lr))
])
/myssd/terguo01/toolchain-build/GCC32RM-424/src/gcc/gcc/testsuite/gcc.dg/vshift-3.c:119
770 {*call_insn}
(expr_list:REG_CALL_DECL (symbol_ref:SI ("f2") [flags 0x3] <function_decl
0x7f8182689100 f2>)
(expr_list:REG_EH_REGION (const_int 0 [0])
(nil)))
(expr_list (clobber (reg:SI 12 ip))
(nil)))
...
I can't rule out that this is a generic bug, so marking tentatively as 5.0
regression.