http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60307
Bug ID: 60307
Summary: define_cond_exec with cc0 comparison generates wrong
code, missing insn that sets cc0
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: makhaloff at gmail dot com
Created attachment 32193
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32193&action=edit
Support conditional execution with cc0
My target has:
#define HAVE_cc0 1
#define HAVE_conditional_execution 1
(from generated file insn-config.h)
ce3 (ifcvt.c) pass converts conditional jump into conditional execution well.
But rtl_merge_blocks (cfgrtl.c) when removes conditional jump, it also removes
insn that sets cc0, without analyze if it might be used in following (just
inserted) cond_exec insn.
As result, we have cond_exec insn without cc0 setter.
I've fixed that moment. It works for me. All gcc tests are passed.
Patch is attached.
Alexey.