On Thu, 24 May 2018, Jeff Law wrote:
+ case LSHIFT_EXPR:
+ if (TREE_CODE (TREE_OPERAND (t, 1)) == INTEGER_CST)
Maybe check INTEGRAL_TYPE_P as well, like you did for PLUS_EXPR? Or was
that also unnecessary for PLUS_EXPR?
While there may be cases where allowing an INTEGRAL_TYPE_P SSA_NAME for
the shift count would be helpful, I think it'd be exceedingly rare.
For operands of a PLUS_EXPR I think we're a lot more likely to be able
to do something useful with an SSA_NAME argument.
This was a while ago, but it seems likely that I meant: check that the
result (or lhs) has scalar integer type (in particular not a vector type).
Or more precisely asking why such a check is done for PLUS_EXPR and not
for LSHIFT_EXPR.
--
Marc Glisse