On Fri, 22 Aug 2014, Marek Polacek wrote:
On Fri, Aug 22, 2014 at 12:52:51PM -0400, Jason Merrill wrote:
On 08/22/2014 12:33 PM, Marek Polacek wrote:
On Fri, Aug 22, 2014 at 12:24:16PM -0400, Jason Merrill wrote:
Sorry to nitpick, but now that we aren't checking the lhs for BOOLEAN_TYPE,
do we need to look at it at all?
I believe so: if the LHS is an INTEGER_CST, we can't use TREE_OPERAND
on it. Happens e.g. for if (!5 > a).
Yes, but why do we want to use TREE_OPERAND on it?
Oh yeah, seems that we don't need that. Actually, I think we can take
this one step further: since we can't use unary ! on a vector, we can
drop the VECTOR_TYPE checks, meaning that we don't need the lhs
parameter at all! What do you say?
Note that there is a patch waiting for a review that makes us accept !v
for vector v:
https://gcc.gnu.org/ml/gcc-patches/2014-08/msg01695.html
I didn't check at what level you do the test, so I don't know if it can
see a TRUTH_NOT_EXPR for a vector or if it has already been replaced by
EQ_EXPR at that point.
--
Marc Glisse