Commit Graph

795 Commits

Author SHA1 Message Date
Richard Kenner
e4ba89beb2 (try_combine): Fix typo in last change involving single_set.
From-SVN: r2409
1992-10-12 11:57:17 -04:00
Richard Kenner
780ed3aef3 (try_combine): Properly call single_set when validating the result of
a define_split.

From-SVN: r2406
1992-10-12 06:30:37 -04:00
Richard Kenner
26ecfc7614 (subst, case SUBREG): Don't make a new REG for stack, frame, or arg
pointer.

From-SVN: r2381
1992-10-09 07:29:23 -04:00
Richard Kenner
c3c2cb3741 (significant_bits, num_sign_bit_copies): Handle SUBREGs made for promoted
variables.

From-SVN: r2215
1992-09-23 19:23:19 -04:00
Richard Stallman
cc4710825d (make_extraction): Make test whether to use AND or
{SIGN,ZERO}_EXTRACT depend on UNSIGNEDP.

From-SVN: r2202
1992-09-21 13:33:38 +00:00
Richard Stallman
e64ff1039c (subst): Set and compare extend_op with 0, not NULL.
From-SVN: r2196
1992-09-21 03:08:45 +00:00
Richard Kenner
22609cbf24 (try_combine): Always call set_significant on new patterns, so don't call
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 20:05:40 -04:00
Richard Kenner
457816e2e2 (subst, simplify_and_const_int, significant_bits): Treat 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-20 05:51:37 -04:00
Richard Kenner
1a26b032d0 (try_combine): When removing REG_UNUSED note, update reg_n_deaths.
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-19 15:53:26 -04:00
Richard Kenner
8888fada84 (try_combine): Make change missing from last modification to splitting
code.

From-SVN: r2059
1992-09-05 22:55:22 -04:00
Richard Kenner
d0dcc580cf (make_compound_operation...
(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-09-02 06:37:38 -04:00
Richard Kenner
5874448344 (subst): When moving operation inside IF_THEN_ELSE, make a new rtx
instead of using SUBST due to sharing.

(simplify_comparison): Correct test for sign extension when trying to
widen comparison.

From-SVN: r1938
1992-08-24 06:48:59 -04:00
Richard Kenner
eeb43d32db (subst): Move up test for too many restarts.
If we restart, clear OP0_MODE since we don't know it.

From-SVN: r1926
1992-08-21 07:52:57 -04:00
Richard Kenner
f8d97cf472 Put include of stdio.h after GCC header files (for i860-stardent-sysv4).
From-SVN: r1905
1992-08-20 05:58:18 -04:00
Richard Kenner
53e33d9533 (subst, case AND): Only make IF_THEN_ELSE if conditional moves exist.
From-SVN: r1903
1992-08-19 21:33:19 -04:00
Richard Kenner
fe0cf571ec Correctly apply last change.
From-SVN: r1895
1992-08-19 07:32:24 -04:00
Richard Kenner
a687e8971c (simplify_comparison): Add a few more cases where we can do the
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-19 07:07:22 -04:00
Richard Stallman
89f1c7f257 (simplify_comparison): Rearrange conditional in SUBREG case.
From-SVN: r1886
1992-08-18 16:59:12 +00:00
Richard Kenner
7c046e4eb2 (struct undo, struct undo_int): Replace non-portable usage with some unions.
(SUBST, SUBST_INT, undo_all, gen_rtx_combine): Make consistent with
new definitions.

From-SVN: r1870
1992-08-17 07:35:04 -04:00
Richard Kenner
2fc9c644a4 (get_last_value): Don't go past a CODE_LABEL when searching for a
value.

From-SVN: r1857
1992-08-15 06:35:08 -04:00
Richard Kenner
d0ab8cd3f3 (reg_sign_bit_copies): New variable.
(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
1992-08-02 21:35:35 -04:00
Richard Kenner
58c8c59349 entered into RCS
From-SVN: r1731
1992-07-31 08:13:38 -04:00
Richard Kenner
510dd77e95 *** empty log message ***
From-SVN: r1730
1992-07-31 08:11:54 -04:00
Richard Kenner
df62f951d0 *** empty log message ***
From-SVN: r1611
1992-07-17 05:52:19 -04:00
Richard Kenner
60654f77ca *** empty log message ***
From-SVN: r1589
1992-07-15 06:46:46 -04:00
Charles Hannum
5f4f0e2294 *** empty log message ***
From-SVN: r1471
1992-07-06 20:04:00 +00:00
Richard Kenner
c767f54b88 *** empty log message ***
From-SVN: r1442
1992-07-05 14:02:06 -04:00
Richard Kenner
cc8765963d *** empty log message ***
From-SVN: r1428
1992-07-04 13:59:44 -04:00
Richard Kenner
02f4ada4da *** empty log message ***
From-SVN: r1316
1992-06-27 15:45:24 -04:00
Richard Kenner
42495ca044 *** empty log message ***
From-SVN: r1296
1992-06-26 07:06:07 -04:00
Richard Stallman
f72aed244a *** empty log message ***
From-SVN: r1263
1992-06-24 03:59:40 +00:00
Richard Kenner
77fa0940a0 *** empty log message ***
From-SVN: r1223
1992-06-20 06:51:46 -04:00
Richard Stallman
9797b9e8f0 *** empty log message ***
From-SVN: r1142
1992-06-02 21:35:27 +00:00
Richard Kenner
3f508ecac8 *** empty log message ***
From-SVN: r1128
1992-05-30 07:09:16 -04:00
Richard Kenner
4803a34aa2 *** empty log message ***
From-SVN: r1057
1992-05-22 17:22:42 -04:00
Jim Wilson
2b4bd1bc30 *** empty log message ***
From-SVN: r1023
1992-05-19 17:20:55 -07:00
Richard Stallman
754731823f *** empty log message ***
From-SVN: r997
1992-05-16 18:14:50 +00:00
Richard Kenner
28f6d3af8c *** empty log message ***
From-SVN: r864
1992-05-01 06:32:59 -04:00
Jim Wilson
bec2e35957 *** empty log message ***
From-SVN: r839
1992-04-27 09:44:10 -07:00
Richard Kenner
a4bde0b117 *** empty log message ***
From-SVN: r764
1992-04-17 15:32:22 -04:00
Richard Kenner
916f14f12b *** empty log message ***
From-SVN: r727
1992-04-11 20:30:30 -04:00
Richard Kenner
a7c9930489 *** empty log message ***
From-SVN: r689
1992-04-05 13:14:56 -04:00
Richard Stallman
5089e22e27 *** empty log message ***
From-SVN: r579
1992-03-23 19:42:32 +00:00
Richard Kenner
dfbe1b2f1f *** empty log message ***
From-SVN: r405
1992-03-06 18:32:19 -05:00
Richard Stallman
230d793d15 Initial revision
From-SVN: r357
1992-02-22 07:32:57 +00:00