* dwarf2out.c (mem_loc_descriptor): Handle IF_THEN_ELSE.

From-SVN: r164762
This commit is contained in:
Jakub Jelinek 2010-09-30 21:24:10 +02:00 committed by Jakub Jelinek
parent 140d4effd5
commit bb6b5461d1
2 changed files with 27 additions and 1 deletions

View File

@ -1,5 +1,7 @@
2010-09-30 Jakub Jelinek <jakub@redhat.com> 2010-09-30 Jakub Jelinek <jakub@redhat.com>
* dwarf2out.c (mem_loc_descriptor): Handle IF_THEN_ELSE.
PR tree-optimization/31261 PR tree-optimization/31261
* fold-const.c (fold_binary): Optimize ((A & N) + B) & M * fold-const.c (fold_binary): Optimize ((A & N) + B) & M
for constants M and N, M == (1LL << cst) - 1 && (N & M) == M. for constants M and N, M == (1LL << cst) - 1 && (N & M) == M.

View File

@ -14162,8 +14162,32 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
} }
break; break;
case COMPARE:
case IF_THEN_ELSE: case IF_THEN_ELSE:
{
dw_loc_descr_ref op2, bra_node, drop_node;
op0 = mem_loc_descriptor (XEXP (rtl, 0), mode,
VAR_INIT_STATUS_INITIALIZED);
op1 = mem_loc_descriptor (XEXP (rtl, 1), mode,
VAR_INIT_STATUS_INITIALIZED);
op2 = mem_loc_descriptor (XEXP (rtl, 2), mode,
VAR_INIT_STATUS_INITIALIZED);
if (op0 == NULL || op1 == NULL || op2 == NULL)
break;
mem_loc_result = op1;
add_loc_descr (&mem_loc_result, op2);
add_loc_descr (&mem_loc_result, op0);
bra_node = new_loc_descr (DW_OP_bra, 0, 0);
add_loc_descr (&mem_loc_result, bra_node);
add_loc_descr (&mem_loc_result, new_loc_descr (DW_OP_swap, 0, 0));
drop_node = new_loc_descr (DW_OP_drop, 0, 0);
add_loc_descr (&mem_loc_result, drop_node);
bra_node->dw_loc_oprnd1.val_class = dw_val_class_loc;
bra_node->dw_loc_oprnd1.v.val_loc = drop_node;
}
break;
case COMPARE:
case ROTATE: case ROTATE:
case ROTATERT: case ROTATERT:
case TRUNCATE: case TRUNCATE: