This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/63798] [5.0 regression] FAIL: gcc.target/powerpc/ppc-fmadd-1.c scan-assembler-not f(add|sub|mul|neg)
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 10 Nov 2014 09:57:52 +0000
- Subject: [Bug tree-optimization/63798] [5.0 regression] FAIL: gcc.target/powerpc/ppc-fmadd-1.c scan-assembler-not f(add|sub|mul|neg)
- Auto-submitted: auto-generated
- References: <bug-63798-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63798
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-11-10
CC|rguenther at suse dot de |rguenth at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Target Milestone|--- |5.0
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
There are four fneg instructions present still with r217281. I suppose
fneg 0,10
fmadd 0,11,0,12
...
fneg 0,10
fmsub 0,11,0,12
...
fneg 12,12
fmadds 0,11,12,0
...
fneg 0,0
fmsubs 0,12,0,11
should have been combined with the following instruction.
I don't see anything wrong here but eventually that
_65 = -_64;
_67 = _63 * _65 + _62;
has canonicalized operand order so that the negate is not always the
first operand of the embedded multiply?
>From expr.c:
def0 = get_def_for_expr (treeop0, NEGATE_EXPR);
def2 = get_def_for_expr (treeop2, NEGATE_EXPR);
...
indeed it doesn't consider the multiply is commutative.
I have a patch.