From: Andrew Pinski Date: Tue, 1 Aug 2017 17:58:17 +0000 (+0000) Subject: tree-ssa-scopedtables.c (hashable_expr_equal_p): Check BIT_INSERT_EXPR's operand... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5cada901b548a5b02e18fe5d5d074c5d100a406d;p=gcc.git tree-ssa-scopedtables.c (hashable_expr_equal_p): Check BIT_INSERT_EXPR's operand 1 to see if the types precision matches. 2017-08-01 Andrew Pinski * tree-ssa-scopedtables.c (hashable_expr_equal_p): Check BIT_INSERT_EXPR's operand 1 to see if the types precision matches. From-SVN: r250790 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 36a02215b48..43b2311973d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-08-01 Andrew Pinski + + * tree-ssa-scopedtables.c (hashable_expr_equal_p): Check + BIT_INSERT_EXPR's operand 1 + to see if the types precision matches. + 2017-08-01 Martin Liska PR middle-end/70140 diff --git a/gcc/tree-ssa-scopedtables.c b/gcc/tree-ssa-scopedtables.c index 814f1c7b05b..7b9ca78a878 100644 --- a/gcc/tree-ssa-scopedtables.c +++ b/gcc/tree-ssa-scopedtables.c @@ -502,6 +502,15 @@ hashable_expr_equal_p (const struct hashable_expr *expr0, expr1->ops.ternary.opnd2, 0)) return false; + /* BIT_INSERT_EXPR has an implict operand as the type precision + of op1. Need to check to make sure they are the same. */ + if (expr0->ops.ternary.op == BIT_INSERT_EXPR + && TREE_CODE (expr0->ops.ternary.opnd1) == INTEGER_CST + && TREE_CODE (expr1->ops.ternary.opnd1) == INTEGER_CST + && TYPE_PRECISION (TREE_TYPE (expr0->ops.ternary.opnd1)) + != TYPE_PRECISION (TREE_TYPE (expr1->ops.ternary.opnd1))) + return false; + if (operand_equal_p (expr0->ops.ternary.opnd0, expr1->ops.ternary.opnd0, 0) && operand_equal_p (expr0->ops.ternary.opnd1,