-/* Initialize for a simple IF-THEN or IF-THEN-ELSE block. We will not
- be using conditional execution. Set some fields of IF_INFO based
- on CE_INFO: test_bb, cond, jump, cond_earliest. Return TRUE if
- things look OK. */
-
-static int
-noce_init_if_info (struct ce_if_block *ce_info, struct noce_if_info *if_info)
-{
- basic_block test_bb = ce_info->test_bb;
- rtx cond, jump;
-
- /* If test is comprised of && or || elements, don't handle it unless
- it is the special case of && elements without an ELSE block. */
- if (ce_info->num_multiple_test_blocks)
- {
- if (ce_info->else_bb || !ce_info->and_and_p)
- return FALSE;
-
- ce_info->test_bb = test_bb = ce_info->last_test_bb;
- ce_info->num_multiple_test_blocks = 0;
- ce_info->num_and_and_blocks = 0;
- ce_info->num_or_or_blocks = 0;
- }
-
- /* If this is not a standard conditional jump, we can't parse it. */
- jump = BB_END (test_bb);
- cond = noce_get_condition (jump, &if_info->cond_earliest);
- if (!cond)
- return FALSE;
-
- /* If the conditional jump is more than just a conditional
- jump, then we can not do if-conversion on this block. */
- if (! onlyjump_p (jump))
- return FALSE;
-
- /* We must be comparing objects whose modes imply the size. */
- if (GET_MODE (XEXP (cond, 0)) == BLKmode)
- return FALSE;
-
- if_info->test_bb = test_bb;
- if_info->cond = cond;
- if_info->jump = jump;
-
- return TRUE;
-}
-