[Bug target/40815] redundant neg instruction caused by loop-invariant

2009-07-21 Thread rguenth at gcc dot gnu dot org
--- Comment #4 from rguenth at gcc dot gnu dot org 2009-07-21 09:30 --- rite = rite + D.2003; is a POINTER_PLUS_EXPR, there is no POINTER_MINUS_EXPR so the separate negation is expected at the tree level. We can fix this as early as during expansion (D.2003 should be marked as elig

[Bug target/40815] redundant neg instruction caused by loop-invariant

2009-07-21 Thread carrot at google dot com
--- Comment #3 from carrot at google dot com 2009-07-21 07:35 --- Created an attachment (id=18235) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18235&action=view) dump of -fdump-rtl-expand-details -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40815

[Bug target/40815] redundant neg instruction caused by loop-invariant

2009-07-21 Thread steven at gcc dot gnu dot org
--- Comment #2 from steven at gcc dot gnu dot org 2009-07-21 07:23 --- You mean to say that all tree optimizers, CSE, CPROP, fwprop, and combine fail to eliminate this? Wow. What does the .expand dump look like (compile with extra flag -fdump-rtl-expand-details, then attach the .expand

[Bug target/40815] redundant neg instruction caused by loop-invariant

2009-07-21 Thread carrot at google dot com
--- Comment #1 from carrot at google dot com 2009-07-21 07:15 --- Created an attachment (id=18234) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18234&action=view) test case -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40815