aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
AgeCommit message (Collapse)AuthorFilesLines
1993-02-25(set_nonzero_bits_and_sign_copies): Fix typo in paradoxical set dest handling.Jim Wilson1-2/+2
From-SVN: r3532
1993-02-13* make setup_incoming_promotions staticDoug Evans1-1/+1
From-SVN: r3468
1993-02-09(setup_incoming_promotions): New function.Richard Kenner1-2/+29
(combine_instructions): Add calls to setup_incoming_promotions. From-SVN: r3451
1993-02-09(combine_instructions): When calling set_nonzero_bits_and_sign_copies,Richard Kenner1-3/+31
set things up so that we can call get_last value; call record_dead_and_set_regs in loop. (set_nonzero_bits_and_sign_copies): Handle paradoxical SET. From-SVN: r3444
1993-01-31(simplify_and_const_int): Never consider bits outside of MODE.Richard Kenner1-2/+5
From-SVN: r3398
1993-01-26(combine_instructions): Initialize undobuf in the eventRichard Kenner1-0/+1
`gen_rtx_combine' is called before `try_combine'. From-SVN: r3359
1993-01-24(apply_distributive_law): Don't mess with float arith.Richard Stallman1-0/+6
From-SVN: r3317
1993-01-19(combine_instructions): Clear reg_last_set_label.Richard Kenner1-0/+1
From-SVN: r3275
1993-01-10(make_extraction): Don't use POS < 0 as a flag that POS_RTX is to be used; ↵Richard Kenner1-18/+25
instead use POS_RTX unless it is nonzero. (make_extraction): Don't use POS < 0 as a flag that POS_RTX is to be used; instead use POS_RTX unless it is nonzero. If POS_RTX is a constant, set POS and clear POS_RTX. (make_compound_operation, make_field_assignment): Pass 0 for POS instead of -1 when POS_RTX is nonzero. From-SVN: r3178
1993-01-08(BYTE_LOAD_EXTEND, LOAD_EXTEND): New macros.Richard Kenner1-8/+23
(subst, simplify_and_const_int, nonzero_bits, num_sign_bit_copies): Use them. (subst, case SET): Make a SIGN_EXTEND instead of paradoxical SUBREG if BYTE_LOADS_SIGN_EXTEND; previously only made ZERO_EXTEND. From-SVN: r3160
1992-12-28Add a few missing HOST_WIDE_INT casts.Richard Kenner1-205/+195
Rename references to `significant' bits to be `nonzero' bits; specifically the following, but also local vars and comments: (reg_nonzero_bits): Renamed from reg_significant. (nonzero_bits): Renamed from significant_bits. (nonzero_sign_valid): Renamed from significant_valid. (set_nonzero_bits_and_sign_copies): Renamed from set_significant. From-SVN: r2975
1992-12-28(simplify_comparison, case NEG): Replace large block of code withRichard Kenner1-22/+3
equivalent call to num_sign_bit_copies. From-SVN: r2972
1992-12-27(subst, case SET): Call recog_for_combine with OTHER_INSN, notRichard Kenner1-1/+1
UNDOBUF.OTHER_INSN. From-SVN: r2933
1992-12-27(subst, comparison cases): Expand any compound operation that is an operand...Richard Kenner1-6/+18
(subst, comparison cases): Expand any compound operation that is an operand; rerun subst on simplified result in one new case. From-SVN: r2922
1992-12-26(gen_lowpart_for_combine): Allow MODE to be wider than a word inRichard Kenner1-1/+8
restricted circumstances. From-SVN: r2914
1992-12-16(try_combine): Allow for the case where I3 becomes anTom Wood1-2/+3
unconditional jump when it is the last nonnote insn. From-SVN: r2881
1992-12-10(try_combine): Only use I2DEST as a scratch reg forJim Wilson1-1/+9
a split if it does not overlap any inputs of NEWPAT. From-SVN: r2857
1992-12-10(get_last_value): Never use value from later insn, even if reg is onlyRichard Kenner1-5/+4
set once. From-SVN: r2856
1992-12-01(num_sign_bit_copies): Return 1 on failure, not 0.Richard Kenner1-2/+2
Fix typo in last change; return 1 on failure, not BITWIDTH. From-SVN: r2827
1992-11-30(subst, make_field_assignment, num_sign_bit_copies): Protect calls to ↵Richard Stallman1-8/+25
significant_bits... (subst, make_field_assignment, num_sign_bit_copies): Protect calls to significant_bits; unless we only care if the result is a power of two, don't call if mode size is wider than HOST_BITS_PER_WIDE_INT. (extended_count, simplify_shift_const, simplify_comparison): Likewise. From-SVN: r2824
1992-11-26(num_sign_bit_copies): Fix 1-off error in PLUS case.Richard Stallman1-1/+1
From-SVN: r2807
1992-11-26(make_extraction): When making a low part subreg of a reg,Richard Stallman1-3/+8
use inner_mode, not is_mode. (num_sign_bit_copies): Inhibit x-1 special case when x is a paradoxical subreg. From-SVN: r2802
1992-11-20(simplify_comparison, case ASHIFTRT): mode_for_sizeRichard Stallman1-1/+1
returns BLKmode on error, not VOIDmode. From-SVN: r2761
1992-10-31(simplify_shift_const):Richard Stallman1-1/+3
For a subreg, require subreg_lowpart_p and not paradoxical. From-SVN: r2664
1992-10-29(make_extraction): Fix paren error in `if' for INNER is reg.Richard Stallman1-4/+4
From-SVN: r2652
1992-10-28(can_combine_p): Don't don't substitute an expressionRichard Stallman1-2/+6
containing a register that will be clobbered in I3. From-SVN: r2631
1992-10-22(make_extraction): Use is_mode, not inner_mode,Richard Stallman1-8/+20
for BYTES_BIG_ENDIAN adjustment to offset for non-bitfield case. Update is_mode when stripping subreg from around a mem. From-SVN: r2556
1992-10-13(subst): Don't change a conditional branch into a conditional move.Tom Wood1-1/+2
From-SVN: r2426
1992-10-12(try_combine): Save DEST of NI2PAT before calling recog_for_combine,Richard Kenner1-3/+5
which might make it a PARALLEL. From-SVN: r2411
1992-10-12(try_combine): Fix typo in last change involving single_set.Richard Kenner1-2/+2
From-SVN: r2409
1992-10-12(try_combine): Properly call single_set when validating the result ofRichard Kenner1-2/+2
a define_split. From-SVN: r2406
1992-10-09(subst, case SUBREG): Don't make a new REG for stack, frame, or argRichard Kenner1-2/+8
pointer. From-SVN: r2381
1992-09-23(significant_bits, num_sign_bit_copies): Handle SUBREGs made for promotedRichard Kenner1-0/+16
variables. From-SVN: r2215
1992-09-21(make_extraction): Make test whether to use AND orRichard Stallman1-4/+4
{SIGN,ZERO}_EXTRACT depend on UNSIGNEDP. From-SVN: r2202
1992-09-21(subst): Set and compare extend_op with 0, not NULL.Richard Stallman1-2/+2
From-SVN: r2196
1992-09-20(try_combine): Always call set_significant on new patterns, so don't callRichard Kenner1-7/+50
just in split case. (subst): Move sign extension inside arithmetic when we have a constant computation inside another computation. From-SVN: r2194
1992-09-20(subst, simplify_and_const_int, significant_bits): Treat ↵Richard Kenner1-9/+28
BYTE_LOADS_SIGN_EXTEND just like BYTE_LOADS_ZERO_EXTEND. (subst, simplify_and_const_int, significant_bits): Treat BYTE_LOADS_SIGN_EXTEND just like BYTE_LOADS_ZERO_EXTEND. (num_sign_bit_copies, case MEM): New case for BYTE_LOADS_SIGN_EXTEND. (num_sign_bit_copies, case SUBREG): Handle just like significant_bits. From-SVN: r2189
1992-09-19(try_combine): When removing REG_UNUSED note, update reg_n_deaths.Richard Kenner1-60/+466
Likewise, when making new REG_DEAD notes for distribute_notes. (remove_death, move_deaths): Update reg_n_deaths. (distribute_notes): When placing second REG_DEAD or REG_UNUSED note or ignoring such a note, update reg_n_deaths. (simplify_comparison, case ASHIFT): Fix typo. (try_combine): The insns made by a DEFINE_SPLIT might contain a PARALLEL and the call to recog_for_combine might add it. (combine_instructions): Clear significant_valid at end of combine pass for a function. (find_split_point, case MEM): See if first operand of the PLUS that makes up an address is complex. (subst): Add missing arg to recursive calls when IF_THEN_ELSE is an arg of an operator. (subst, case IF_THEN_ELSE): Generalize code to propagate comparison result into arms by using known_cond. If an arm is the first operand of the comparison, make it the true arm. Remove unneeded comparison when arms are identical. Try to convert IF_THEN_ELSE to ABS, (neg (abs X)), [US]MIN, [US]MAX. Convert (if_then_else (ne A 0) (OP X C) X) to (OP X (mult A C)). (subst, case SET): If we don't have conditional moves, convert IF_THEN_ELSE into logical operations. (subst, case AND): Always make conditional moves, even if we don't support them on the machine. (known_cond, extended_count): New functions. (gen_binary): For commutative operations, put constant last. From-SVN: r2182
1992-09-05(try_combine): Make change missing from last modification to splittingRichard Kenner1-1/+2
code. From-SVN: r2059
1992-09-02(make_compound_operation...Richard Kenner1-0/+13
(make_compound_operation, case ASHIFTRT): Add new code to handle (ashiftrt (neg (ashift FOO C1) C2)) just like we currently handle (ashiftrt (OP (ashiftrt FOO C1) C2) C2). From-SVN: r2028
1992-08-24(subst): When moving operation inside IF_THEN_ELSE, make a new rtxRichard Kenner1-20/+21
instead of using SUBST due to sharing. (simplify_comparison): Correct test for sign extension when trying to widen comparison. From-SVN: r1938
1992-08-21(subst): Move up test for too many restarts.Richard Kenner1-5/+12
If we restart, clear OP0_MODE since we don't know it. From-SVN: r1926
1992-08-20Put include of stdio.h after GCC header files (for i860-stardent-sysv4).Richard Kenner1-2/+1
From-SVN: r1905
1992-08-19(subst, case AND): Only make IF_THEN_ELSE if conditional moves exist.Richard Kenner1-0/+5
From-SVN: r1903
1992-08-19Correctly apply last change.Richard Kenner1-3/+3
From-SVN: r1895
1992-08-19(simplify_comparison): Add a few more cases where we can do theRichard Kenner1-19/+72
comparison in a wider mode. (distribute_notes, REG_EQUAL): Don't put back a note with a non-constant expression since it may no longer be valid. From-SVN: r1894
1992-08-18(simplify_comparison): Rearrange conditional in SUBREG case.Richard Stallman1-4/+6
From-SVN: r1886
1992-08-17(struct undo, struct undo_int): Replace non-portable usage with some unions.Richard Kenner1-23/+20
(SUBST, SUBST_INT, undo_all, gen_rtx_combine): Make consistent with new definitions. From-SVN: r1870
1992-08-15(get_last_value): Don't go past a CODE_LABEL when searching for aRichard Kenner1-2/+2
value. From-SVN: r1857
1992-08-02(reg_sign_bit_copies): New variable.Richard Kenner1-209/+800
(combine_instructions): Initialize it. (set_significant): Set it. (try_combine): Set subst_low_cuid immediately before calling `subst' to the INSN_CUID of the lowest insn involved in the call. Change XOR with out-of-range constant to (not (xor ...)). Call both split_insns and find_split_point; pass extra parm to find_split_point. Record I2DEST's value if I2 now sets it; similarly for I1DEST. (find_split_point): Add new arg INSN. If AND'ing with a large single-bit constant and we only care about equality with zero, replace with bit extraction. Make two shifts for ZERO_EXTRACTs unless very narrow. (subst): Move RESTART label earlier. If we have a simple operation applied to IF_THEN_ELSE, move the operation inside the two arms. (subst, case SUBREG): Use force_to_mode. (subst, case NOT): Change (not (xor X C)) to (xor X ~C). (subst, case NEG): Remove (neg (abs X)); redundant. Convert (neg (xor A 1)) to (plus A -1) if A is known to be 0 or 1. (subst, case IF_THEN_ELSE): Simplify if an arm contains a register being tested by substiting the known value. Put constant integer in last arm if can reverse comparison. (subst, case SET): Use gen_lowpart_for_combine. (subst, case AND): Make IF_THEN_ELSE when appropriate. (subst, case IOR): (ior A C) can sometimes be just C. (subst, case XOR): Go back and restart when canonicalizing. (subst, case ABS): Use num_sign_bit_copies. (make_extraction): Call force_to_mode. (make_compound_operation): Look at optabs rather that explicitly checking for operations and assuming we have SImode. Handle (ashiftrt (OP (ashift foo C1) C3) C2). (force_to_mode): Only change mode of arithmetic if optab says we have operation in that mode. Remove unneeded ASHIFTRT; add handling for IF_THEN_ELSE. (significant_bits, case NEG): Call num_sign_bit_copies. (significant_bits, case ABS, case [US]{MIN,MAX}, IF_THEN_ELSE): New. (num_sign_bit_copies): New function. (simplify_shift_const): Remove ASHIFTRT if value is known -1 or 0. Use num_sign_bit_copies to simplify (ashiftrt (ashift ...) ...) and (ashiftrt (neg ...) ...). Remove now redundant case when VAROP is a PLUS. (simplify_comparison): If A is known to be -1 or 0, A != -1 is A == 0. Simplify unsigned tests that really check the sign bit. (simplify_comparison, case ASHIFTRT): Convert to LSHIFTRT if equality comparison with zero. (get_last_value): Check if the desired register is set in the insn before the one whose INSN_CUID is subst_low_cuid. From-SVN: r1746