From mboxrd@z Thu Jan 1 00:00:00 1970 From: hjl@lucon.org (H.J. Lu) To: acs@alumni.princeton.edu Cc: jinbo21@soback.kornet.nm.kr, egcs@cygnus.com Subject: Re: Different Test Results w/ -march=pentiumpro Date: Thu, 07 May 1998 17:39:00 -0000 Message-id: References: <199805070316.XAA18129@spacely.icd.teradyne.com> X-SW-Source: 1998-05/msg00256.html > > On my UnixWare 2.1.2 (i386-pc-sysv4.2uw2.1.2) system with the 0502 snapshot, > I get different test results when I add -march=pentiumpro to BOOT_CFLAGS. > > In the first case I built with: > BOOT_CFLAGS='-O3 -malign-jumps=4 -malign-loops=4 -malign-functions=4' > > while in the second, I added -march=pentiumpro: > BOOT_CFLAGS='-O3 -march=pentiumpro -malign-jumps=4 -malign-loops=4 -malign-functions=4' > > I am not sure if this patch works or not. Should egcs 1.0.x also be fixed? H.J. -- Thu May 7 16:48:52 1998 H.J. Lu (hjl@gnu.org) * final.c (final_scan_insn): Don't ignore the test/compare insn if there may be an overflow. Index: final.c =================================================================== RCS file: /home/work/cvs/gnu/egcs/gcc/final.c,v retrieving revision 1.1.1.27 diff -u -p -r1.1.1.27 final.c --- final.c 1998/05/07 15:45:19 1.1.1.27 +++ final.c 1998/05/07 23:46:41 @@ -297,7 +297,7 @@ static void leaf_renumber_regs PROTO((rt static int alter_cond PROTO((rtx)); #endif -extern char *getpwd (); +extern char *getpwd PROTO((void)); /* Initialize data in final at the beginning of a compilation. */ @@ -2507,10 +2507,11 @@ final_scan_insn (insn, file, optimize, p XEXP (SET_SRC (set), 1) = alter_subreg (XEXP (SET_SRC (set), 1)); } - if ((cc_status.value1 != 0 - && rtx_equal_p (SET_SRC (set), cc_status.value1)) - || (cc_status.value2 != 0 - && rtx_equal_p (SET_SRC (set), cc_status.value2))) + if ((cc_status.flags & CC_NO_OVERFLOW) == 0 + && ((cc_status.value1 != 0 + && rtx_equal_p (SET_SRC (set), cc_status.value1)) + || (cc_status.value2 != 0 + && rtx_equal_p (SET_SRC (set), cc_status.value2)))) { /* Don't delete insn if it has an addressing side-effect. */ if (! FIND_REG_INC_NOTE (insn, 0)