This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/80723] New: [8 Regression] FAIL gcc.target/i386/cadd.c scan assembler sbb
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 12 May 2017 08:07:50 +0000
- Subject: [Bug rtl-optimization/80723] New: [8 Regression] FAIL gcc.target/i386/cadd.c scan assembler sbb
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80723
Bug ID: 80723
Summary: [8 Regression] FAIL gcc.target/i386/cadd.c scan
assembler sbb
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: ubizjak at gmail dot com
Target Milestone: ---
This is a recent failure on 32bit x86 target, where if-conversion is not
performed for some reason (but it is for 32bit target).
gcc -O2 -march=k8
64 bit target:
==============
_.243r.ce1:
;; Function q (q, funcdef_no=0, decl_uid=1821, cgraph_uid=0, symbol_order=1)
0 registers.
9 basic blocks, 10 edges.
4: NOTE_INSN_BASIC_BLOCK 2
2: NOTE_INSN_FUNCTION_BEG
6: r89:DI=`t'
3: r88:SI=0
16: L16:
8: NOTE_INSN_BASIC_BLOCK 3
9: flags:CCZ=cmp([r89:DI],0)
10: pc={(flags:CCZ==0)?L13:pc}
REG_DEAD flags:CCZ
REG_BR_PROB 5000
11: NOTE_INSN_BASIC_BLOCK 4
12: {r88:SI=r88:SI+0x1;clobber flags:CC;}
REG_UNUSED flags:CC
13: L13:
14: NOTE_INSN_BASIC_BLOCK 5
15: {r89:DI=r89:DI+0x4;clobber flags:CC;}
REG_UNUSED flags:CC
17: flags:CCZ=cmp(r89:DI,const(`t'+0x28))
18: pc={(flags:CCZ!=0)?L16:pc}
REG_DEAD flags:CCZ
REG_BR_PROB 9000
19: NOTE_INSN_BASIC_BLOCK 6
20: flags:CCZ=cmp(r88:SI,0x6)
REG_DEAD r88:SI
21: pc={(flags:CCZ==0)?L27:pc}
REG_DEAD flags:CCZ
REG_BR_PROB 9996
22: NOTE_INSN_BASIC_BLOCK 7
23: call [`abort'] argc:0
REG_CALL_DECL `abort'
REG_NORETURN 0
REG_EH_REGION 0
27: L27:
28: NOTE_INSN_BASIC_BLOCK 8
try_optimize_cfg iteration 1
;; 2 loops found
;;
;; Loop 0
;; header 0, latch 1
;; depth 0, outer -1
;; nodes: 0 1 2 3 4 5 6 7 8
;;
;; Loop 1
;; header 3, latch 5
;; depth 1, outer 0
;; nodes: 3 5 4
;; 2 succs { 3 }
;; 3 succs { 4 5 }
;; 4 succs { 5 }
;; 5 succs { 3 6 }
;; 6 succs { 7 8 }
;; 7 succs { }
;; 8 succs { 1 }
starting the processing of deferred insns
ending the processing of deferred insns
df_analyze called
IF-THEN-JOIN block found, pass 1, test 3, then 4, join 5
scanning new insn with uid = 30.
scanning new insn with uid = 31.
if-conversion succeeded through noce_try_addcc
Removing jump 10.
deleting insn with uid = 10.
deleting insn with uid = 12.
deleting block 4
Conversion succeeded on pass 1.
IF-CASE-2 found, start 6, else 8
32 bit target:
==============
;; Function q (q, funcdef_no=0, decl_uid=1760, cgraph_uid=0, symbol_order=1)
0 registers.
9 basic blocks, 10 edges.
5: NOTE_INSN_BASIC_BLOCK 2
2: NOTE_INSN_FUNCTION_BEG
3: r90:SI=0
4: r88:SI=0
16: L16:
7: NOTE_INSN_BASIC_BLOCK 3
9: flags:CCZ=cmp([r90:SI*0x4+`t'],0)
10: pc={(flags:CCZ==0)?L13:pc}
REG_DEAD flags:CCZ
REG_BR_PROB 5000
11: NOTE_INSN_BASIC_BLOCK 4
12: {r88:SI=r88:SI+0x1;clobber flags:CC;}
REG_UNUSED flags:CC
13: L13:
14: NOTE_INSN_BASIC_BLOCK 5
15: {r90:SI=r90:SI+0x1;clobber flags:CC;}
REG_UNUSED flags:CC
17: flags:CCZ=cmp(r90:SI,0xa)
18: pc={(flags:CCZ!=0)?L16:pc}
REG_DEAD flags:CCZ
REG_BR_PROB 9000
19: NOTE_INSN_BASIC_BLOCK 6
20: flags:CCZ=cmp(r88:SI,0x6)
REG_DEAD r88:SI
21: pc={(flags:CCZ==0)?L27:pc}
REG_DEAD flags:CCZ
REG_BR_PROB 9996
22: NOTE_INSN_BASIC_BLOCK 7
23: call [`abort'] argc:0
REG_CALL_DECL `abort'
REG_NORETURN 0
REG_EH_REGION 0
27: L27:
28: NOTE_INSN_BASIC_BLOCK 8
try_optimize_cfg iteration 1
;; 2 loops found
;;
;; Loop 0
;; header 0, latch 1
;; depth 0, outer -1
;; nodes: 0 1 2 3 4 5 6 7 8
;;
;; Loop 1
;; header 3, latch 5
;; depth 1, outer 0
;; nodes: 3 5 4
;; 2 succs { 3 }
;; 3 succs { 4 5 }
;; 4 succs { 5 }
;; 5 succs { 3 6 }
;; 6 succs { 7 8 }
;; 7 succs { }
;; 8 succs { 1 }
starting the processing of deferred insns
ending the processing of deferred insns
df_analyze called
IF-THEN-JOIN block found, pass 1, test 3, then 4, join 5
IF-CASE-2 found, start 6, else 8
AFAICS, the starting sequence is almost equal (32bit target has more complex
memory access, but it shouldn't matter here), so it should also be converted
through noce_try_addcc on 32bit targets.