diff options
author | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-03 02:09:20 +0000 |
---|---|---|
committer | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-03 02:09:20 +0000 |
commit | 469b75f7ffaf41f590c14f88b74ed63d808e332d (patch) | |
tree | 27d6aeb3a7b64063a0e152660705ca93e4060509 /gcc/expr.c | |
parent | 3ef17f9b7f6939e2c19458050f00b18081fb18e9 (diff) | |
download | gcc-469b75f7ffaf41f590c14f88b74ed63d808e332d.tar.gz |
PR middle-end/35800
* expr.h (try_casesi): Adjust prototype.
* expr.c (try_casesi): Take fallback label as extra parameter.
Use that for gen_casesi if default_label is NULL.
* stmt.c (expand_case): Pass fallback label to try_casesi,
make sure to fill gaps with a fallback label if default_label
is not present.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133857 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index a2bd86c4d09..b0690f51c53 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -9830,7 +9830,8 @@ case_values_threshold (void) 0 otherwise (i.e. if there is no casesi instruction). */ int try_casesi (tree index_type, tree index_expr, tree minval, tree range, - rtx table_label ATTRIBUTE_UNUSED, rtx default_label) + rtx table_label ATTRIBUTE_UNUSED, rtx default_label, + rtx fallback_label ATTRIBUTE_UNUSED) { enum machine_mode index_mode = SImode; int index_bits = GET_MODE_BITSIZE (index_mode); @@ -9894,7 +9895,8 @@ try_casesi (tree index_type, tree index_expr, tree minval, tree range, op2 = copy_to_mode_reg (op_mode, op2); emit_jump_insn (gen_casesi (index, op1, op2, - table_label, default_label)); + table_label, !default_label + ? fallback_label : default_label)); return 1; } |