diff options
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r-- | gcc/tree-ssa-sccvn.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 832328d328a..2391632364d 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -2194,6 +2194,9 @@ vn_nary_length_from_stmt (gimple stmt) case VIEW_CONVERT_EXPR: return 1; + case BIT_FIELD_REF: + return 3; + case CONSTRUCTOR: return CONSTRUCTOR_NELTS (gimple_assign_rhs1 (stmt)); @@ -2220,6 +2223,13 @@ init_vn_nary_op_from_stmt (vn_nary_op_t vno, gimple stmt) vno->op[0] = TREE_OPERAND (gimple_assign_rhs1 (stmt), 0); break; + case BIT_FIELD_REF: + vno->length = 3; + vno->op[0] = TREE_OPERAND (gimple_assign_rhs1 (stmt), 0); + vno->op[1] = TREE_OPERAND (gimple_assign_rhs1 (stmt), 1); + vno->op[2] = TREE_OPERAND (gimple_assign_rhs1 (stmt), 2); + break; + case CONSTRUCTOR: vno->length = CONSTRUCTOR_NELTS (gimple_assign_rhs1 (stmt)); for (i = 0; i < vno->length; ++i) @@ -2227,6 +2237,7 @@ init_vn_nary_op_from_stmt (vn_nary_op_t vno, gimple stmt) break; default: + gcc_checking_assert (!gimple_assign_single_p (stmt)); vno->length = gimple_num_ops (stmt) - 1; for (i = 0; i < vno->length; ++i) vno->op[i] = gimple_op (stmt, i + 1); |