This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/23326] [4.0 Regression] Wrong code from forwprop
- From: "rguenth at tat dot physik dot uni-tuebingen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Aug 2005 17:43:15 -0000
- Subject: [Bug tree-optimization/23326] [4.0 Regression] Wrong code from forwprop
- References: <20050811152012.23326.rguenth@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rguenth at tat dot physik dot uni-tuebingen dot de 2005-08-11 17:43 -------
I'll do that. Though
+ /* If we don't have <NE_EXPR/NE_EXPR x INT_CST>, then we cannot
+ optimize this case. */
+ if ((cond_code == NE_EXPR || cond_code == EQ_EXPR)
+ && TREE_CODE (TREE_OPERAND (cond, 1)) != INTEGER_CST)
+ continue;
should probably read
+ /* If we don't have <NE_EXPR/EQ_EXPR x INT_CST>, then we cannot
+ optimize this case. */
+ if (!((cond_code == NE_EXPR || cond_code == EQ_EXPR)
+ && TREE_CODE (TREE_OPERAND (cond, 1)) == INTEGER_CST))
+ continue;
because else we might get f.i. LE_EXPR passing through? Maybe the little
context confuses me here, though.
I'll have a look before testing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23326