+2017-06-16 Yury Gribov <tetra2005@gmail.com>
+
+ PR tree-optimization/81089
+ * tree-vrp.c (is_masked_range_test): Validate operands of
+ subexpression.
+
2017-06-15 Martin Sebor <msebor@redhat.com>
PR c++/80560
|| gimple_assign_rhs_code (def_stmt) != BIT_AND_EXPR)
return false;
+ tree t = gimple_assign_rhs1 (def_stmt);
tree maskt = gimple_assign_rhs2 (def_stmt);
- if (TREE_CODE (maskt) != INTEGER_CST)
+ if (TREE_CODE (t) != SSA_NAME || TREE_CODE (maskt) != INTEGER_CST)
return false;
wide_int mask = maskt;
|| (val & mask) != val)
return false;
- tree t = gimple_assign_rhs1 (def_stmt);
- tree type = TREE_TYPE (t);
-
bool is_range = cond_code == EQ_EXPR;
+ tree type = TREE_TYPE (t);
wide_int min = wi::min_value (type),
max = wi::max_value (type);