This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/23326] [4.0 Regression] Wrong code from forwprop


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]