diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-22 10:29:13 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-22 10:29:13 +0000 |
commit | 971ba038cb2a1622217c016dc0203452f9bc5dcd (patch) | |
tree | 11fcb232ab948e07b794c4b08b2ffbb2030069f7 /gcc/ifcvt.c | |
parent | fee20f444f6e1bf1f5372adff13d497c9322464f (diff) | |
download | gcc-971ba038cb2a1622217c016dc0203452f9bc5dcd.tar.gz |
2009-06-22 Shujing Zhao <pearly.zhao@oracle.com>
* alias.c: Use REG_P, MEM_P, CONST_INT_P, LABEL_P, CALL_P, NOTE_P and
JUMP_TABLE_DATA_P predicates where applicable.
* auto-inc-dec.c: Ditto.
* builtins.c: Ditto.
* caller-save.c: Ditto.
* calls.c: Ditto.
* cfgcleanup.c: Ditto.
* cfglayout.c: Ditto.
* cfgrtl.c: Ditto.
* combine.c: Ditto.
* combine-stack-adj.c: Ditto.
* cse.c: Ditto.
* cselib.c: Ditto.
* dbxout.c: Ditto.
* df-scan.c: Ditto.
* dse.c: Ditto.
* dwarf2asm.c: Ditto.
* dwarf2out.c: Ditto.
* emit-rtl.c: Ditto.
* except.c: Ditto.
* explow.c: Ditto.
* expmed.c: Ditto.
* expr.c: Ditto.
* final.c: Ditto.
* function.c: Ditto.
* fwprop.c: Ditto.
* gcse.c: Ditto.
* genpreds.c: Ditto.
* genrecog.c: Ditto.
* ifcvt.c: Ditto.
* ira-costs.c: Ditto.
* ira-lives.c: Ditto.
* jump.c: Ditto.
* loop-iv.c: Ditto.
* lower-subreg.c: Ditto.
* modulo-sched.c: Ditto.
* optabs.c: Ditto.
* postreload.c: Ditto.
* print-rtl.c: Ditto.
* recog.c: Ditto.
* reginfo.c: Ditto.
* regmove.c: Ditto.
* reload1.c: Ditto.
* reload.c: Ditto.
* reorg.c: Ditto.
* rtlanal.c: Ditto.
* rtl.c: Ditto.
* sched-vis.c: Ditto.
* sdbout.c: Ditto.
* sel-sched-ir.c: Ditto.
* simplify-rtx.c: Ditto.
* targhooks.c: Ditto.
* var-tracking.c: Ditto.
* vmsdbgout.c: Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148786 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r-- | gcc/ifcvt.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index a4324a59b9f..fee72e7b614 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -905,12 +905,12 @@ noce_try_store_flag (struct noce_if_info *if_info) int reversep; rtx target, seq; - if (GET_CODE (if_info->b) == CONST_INT + if (CONST_INT_P (if_info->b) && INTVAL (if_info->b) == STORE_FLAG_VALUE && if_info->a == const0_rtx) reversep = 0; else if (if_info->b == const0_rtx - && GET_CODE (if_info->a) == CONST_INT + && CONST_INT_P (if_info->a) && INTVAL (if_info->a) == STORE_FLAG_VALUE && (reversed_comparison_code (if_info->cond, if_info->jump) != UNKNOWN)) @@ -952,8 +952,8 @@ noce_try_store_flag_constants (struct noce_if_info *if_info) int normalize, can_reverse; enum machine_mode mode; - if (GET_CODE (if_info->a) == CONST_INT - && GET_CODE (if_info->b) == CONST_INT) + if (CONST_INT_P (if_info->a) + && CONST_INT_P (if_info->b)) { mode = GET_MODE (if_info->x); ifalse = INTVAL (if_info->a); @@ -1538,7 +1538,7 @@ noce_get_alt_condition (struct noce_if_info *if_info, rtx target, make equivalent types of changes) to get the constants we need if they're off by one in the right direction. */ - if (GET_CODE (target) == CONST_INT) + if (CONST_INT_P (target)) { enum rtx_code code = GET_CODE (if_info->cond); rtx op_a = XEXP (if_info->cond, 0); @@ -1555,14 +1555,14 @@ noce_get_alt_condition (struct noce_if_info *if_info, rtx target, rtx src = find_reg_equal_equiv_note (prev_insn); if (!src) src = SET_SRC (PATTERN (prev_insn)); - if (GET_CODE (src) == CONST_INT) + if (CONST_INT_P (src)) { if (rtx_equal_p (op_a, SET_DEST (PATTERN (prev_insn)))) op_a = src; else if (rtx_equal_p (op_b, SET_DEST (PATTERN (prev_insn)))) op_b = src; - if (GET_CODE (op_a) == CONST_INT) + if (CONST_INT_P (op_a)) { rtx tmp = op_a; op_a = op_b; @@ -1574,7 +1574,7 @@ noce_get_alt_condition (struct noce_if_info *if_info, rtx target, /* Now, look to see if we can get the right constant by adjusting the conditional. */ - if (GET_CODE (op_b) == CONST_INT) + if (CONST_INT_P (op_b)) { HOST_WIDE_INT desired_val = INTVAL (target); HOST_WIDE_INT actual_val = INTVAL (op_b); @@ -1973,7 +1973,7 @@ noce_try_bitop (struct noce_if_info *if_info) if (GET_CODE (cond) == ZERO_EXTRACT) { if (XEXP (cond, 1) != const1_rtx - || GET_CODE (XEXP (cond, 2)) != CONST_INT + || !CONST_INT_P (XEXP (cond, 2)) || ! rtx_equal_p (x, XEXP (cond, 0))) return FALSE; bitnum = INTVAL (XEXP (cond, 2)); @@ -1991,7 +1991,7 @@ noce_try_bitop (struct noce_if_info *if_info) { /* Check for "if (X & C) x = x op C". */ if (! rtx_equal_p (x, XEXP (a, 0)) - || GET_CODE (XEXP (a, 1)) != CONST_INT + || !CONST_INT_P (XEXP (a, 1)) || (INTVAL (XEXP (a, 1)) & GET_MODE_MASK (mode)) != (unsigned HOST_WIDE_INT) 1 << bitnum) return FALSE; @@ -2017,7 +2017,7 @@ noce_try_bitop (struct noce_if_info *if_info) { /* Check for "if (X & C) x &= ~C". */ if (! rtx_equal_p (x, XEXP (a, 0)) - || GET_CODE (XEXP (a, 1)) != CONST_INT + || !CONST_INT_P (XEXP (a, 1)) || (INTVAL (XEXP (a, 1)) & GET_MODE_MASK (mode)) != (~((HOST_WIDE_INT) 1 << bitnum) & GET_MODE_MASK (mode))) return FALSE; @@ -2142,7 +2142,7 @@ noce_mem_write_may_trap_or_fault_p (const_rtx mem) addr = XEXP (addr, 1); break; case PLUS: - if (GET_CODE (XEXP (addr, 1)) == CONST_INT) + if (CONST_INT_P (XEXP (addr, 1))) addr = XEXP (addr, 0); else return false; @@ -2298,8 +2298,8 @@ noce_process_if_block (struct noce_if_info *if_info) return FALSE; if (GET_CODE (x) == ZERO_EXTRACT - && (GET_CODE (XEXP (x, 1)) != CONST_INT - || GET_CODE (XEXP (x, 2)) != CONST_INT)) + && (!CONST_INT_P (XEXP (x, 1)) + || !CONST_INT_P (XEXP (x, 2)))) return FALSE; x = gen_reg_rtx (GET_MODE (GET_CODE (x) == STRICT_LOW_PART |