public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/12845] New: Error: Invalid Compare and Branch Condition
@ 2003-10-30 19:31 danglin at gcc dot gnu dot org
  2003-10-30 19:52 ` [Bug optimization/12845] [3.4 Regression] " pinskia at gcc dot gnu dot org
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: danglin at gcc dot gnu dot org @ 2003-10-30 19:31 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12845

           Summary: Error: Invalid Compare and Branch Condition
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: hppa64-hp-hpux11.11
  GCC host triplet: hppa64-hp-hpux11.11
GCC target triplet: hppa64-hp-hpux11.11

The following error occurs with 3.4 cvs source as 10/30/03:

/xxx/gnu/gcc-3.3/objdir/gcc/xgcc -shared-libgcc -B/xxx/gnu/gcc-3.3/objdir/gcc/ -
nostdinc++ -L/xxx/gnu/gcc-3.3/objdir/hppa64-hp-hpux11.11/libstdc++-v3/src -L/xxx
/gnu/gcc-3.3/objdir/hppa64-hp-hpux11.11/libstdc++-v3/src/.libs -B/opt/gnu64/hppa
64-hp-hpux11.11/bin/ -B/opt/gnu64/hppa64-hp-hpux11.11/lib/ -isystem /opt/gnu64/h
ppa64-hp-hpux11.11/include -isystem /opt/gnu64/hppa64-hp-hpux11.11/sys-include -
I/xxx/gnu/gcc-3.3/objdir/hppa64-hp-hpux11.11/libstdc++-v3/include/hppa64-hp-hpux
11.11 -I/xxx/gnu/gcc-3.3/objdir/hppa64-hp-hpux11.11/libstdc++-v3/include -I/xxx/
gnu/gcc-3.3/gcc/libstdc++-v3/libsupc++ -O2 -g -O2 -g -O2 -fno-implicit-templates
 -Wall -W -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once -ffunctio
n-sections -fdata-sections -c ../../../../gcc/libstdc++-v3/src/locale-inst.cc  -
fPIC -DPIC -o .libs/locale-inst.o
/var/tmp//ccT9I4xO.s: Assembler messages:
/var/tmp//ccT9I4xO.s:76351: Error: Invalid Compare and Branch Condition

The problematic assembler instruction is:

        cmpib,*>> 0,%r20,L$14585

The condition "*>>" doesn't exist for doubleword cmpib insns.  It does
exist for the cmpb insn (opd1 is greater than opd2, unsigned double word).
We should be generating

	cmpb,*>> %r0,%r20,L$14585

in this situation.

It can be seen that the branch condition is never true.  This is the rtl:

(insn 23955 11294 11314 /xxx/gnu/gcc-3.3/objdir/hppa64-hp-hpux11.11/libstdc++-v3
/include/bits/basic_string.h:290 (sequence [
            (jump_insn 11303 11294 11309 /xxx/gnu/gcc-3.3/objdir/hppa64-hp-hpux1
1.11/libstdc++-v3/include/bits/basic_string.h:522 (set (pc)
                    (if_then_else (ltu (reg/v:DI %r20 [orig:1770 <anonymous> ] [
1770])
                            (const_int 0 [0x0]))
                        (label_ref 22687)
                        (pc))) 48 {*pa.md:1728} (insn_list:REG_DEP_ANTI 21832 (i
nsn_list:REG_DEP_ANTI 11273 (insn_list 11293 (insn_list:REG_DEP_ANTI 11234 (nil)
))))
                (expr_list:REG_BR_PRED (const_int 17 [0x11])
                    (expr_list:REG_DEAD (reg/v:DI %r20 [orig:1770 <anonymous> ] 
[1770])
                        (expr_list:REG_BR_PROB (const_int 3000 [0xbb8])
                            (nil)))))
            (insn/s:TI 11309 11303 11314 (set (reg:DI %r1 [1777])
                    (plus:DI (reg:DI %r27)
                        (high:DI (symbol_ref/v/f:DI ("*L$C0589") [flags 0x2] <st
ring_cst 800003fffbacd9f0>)))) 82 {*pa.md:2535} (nil)
                (nil))
        ]) -1 (nil)

I believe we have a regression in jump optimization as we never hit this
corner case before.  Why wasn't the jump deleted?


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2005-02-02 12:24 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-30 19:31 [Bug optimization/12845] New: Error: Invalid Compare and Branch Condition danglin at gcc dot gnu dot org
2003-10-30 19:52 ` [Bug optimization/12845] [3.4 Regression] " pinskia at gcc dot gnu dot org
2003-11-02 20:59 ` danglin at gcc dot gnu dot org
2003-11-02 21:01 ` danglin at gcc dot gnu dot org
2003-11-02 21:02 ` danglin at gcc dot gnu dot org
2003-11-02 21:38 ` cvs-commit at gcc dot gnu dot org
2003-11-04 14:26 ` pinskia at gcc dot gnu dot org
2003-12-24 16:19 ` kazu at cs dot umass dot edu
2003-12-24 21:55 ` dave at hiauly1 dot hia dot nrc dot ca
2004-01-01  6:06 ` pinskia at gcc dot gnu dot org
2004-01-10 11:32 ` [Bug optimization/12845] [3.4 Regression] missed jump optimization steven at gcc dot gnu dot org
2004-01-13  4:18 ` pinskia at gcc dot gnu dot org
2004-01-14 14:45 ` dave at hiauly1 dot hia dot nrc dot ca
2004-03-16 16:23 ` [Bug optimization/12845] [3.4/3.5 " mmitchel at gcc dot gnu dot org
2004-06-18 23:42 ` [Bug rtl-optimization/12845] " mmitchel at gcc dot gnu dot org
2004-06-19  0:13 ` dave at hiauly1 dot hia dot nrc dot ca
2004-08-29 19:02 ` mmitchel at gcc dot gnu dot org
2004-11-01  0:45 ` [Bug rtl-optimization/12845] [3.4/4.0 " mmitchel at gcc dot gnu dot org
2004-12-13 18:58 ` kazu at cs dot umass dot edu
2004-12-13 19:08 ` dave at hiauly1 dot hia dot nrc dot ca
2005-01-31 13:55 ` kazu at cs dot umass dot edu
2005-02-02  5:50 ` [Bug rtl-optimization/12845] [3.4 " ian at airs dot com
2005-02-02 12:24 ` giovannibajo at libero dot it

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).