This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/21716] New: ICE in reg-stack.c's swap_rtx_condition
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 May 2005 08:58:50 -0000
- Subject: [Bug target/21716] New: ICE in reg-stack.c's swap_rtx_condition
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Attached testcase ICEs at -m32 -march=i386 -O2 -ffast-math in swap_rtx_condition.
Cross jumping there merges testqi_ext_0/jcc_1 from 2 different BB's, but keeps
the %ax setters (cmpfp_2_df_1) in the original blocks.
(insn:HI 2037 4155 2038 55 (set (reg:HI 0 ax [783])
(unspec:HI [
(compare:CCFP (reg/v:DF 10 st(2) [orig:354 cf0d2 ] [354])
(reg:DF 12 st(4)))
] 24)) 22 {*cmpfp_2_df_1} (insn_list 4399 (insn_list 4400 (nil)))
(expr_list:REG_DEAD (reg:DF 12 st(4))
(nil)))
(note:HI 2038 2037 4525 55 NOTE_INSN_DELETED)
;; End of basic block 55, registers live:
0 [ax] 3 [bx] 4 [si] 5 [di] 6 [bp] 7 [sp] 10 [st(2)] 11 [st(3)] 13 [st(5)] 14
[st(6)] 15 [st(7)] 16 [argp] 20 [frame]
;; Start of basic block 56, registers live: 0 [ax] 3 [bx] 4 [si] 5 [di] 6 [bp] 7
[sp] 10 [st(2)] 11 [st(3)] 13 [st(5)] 14 [st(6)] 15 [st(7)] 16 [argp] 20 [frame]
(code_label 4525 2038 4523 56 173 "" [1 uses])
(note 4523 4525 2448 56 [bb 56] NOTE_INSN_BASIC_BLOCK)
(note:HI 2448 4523 2449 56 NOTE_INSN_DELETED)
(note:HI 2449 2448 2450 56 NOTE_INSN_DELETED)
(note:HI 2450 2449 4359 56 NOTE_INSN_DELETED)
(insn 4359 2450 2453 56 (set (reg:CCZ 17 flags)
(compare:CCZ (and:SI (zero_extract:SI (reg:SI 0 ax [834])
(const_int 8 [0x8])
(const_int 8 [0x8]))
(const_int 1 [0x1]))
(const_int 0 [0x0]))) 278 {*testqi_ext_0} (nil)
(expr_list:REG_DEAD (reg:SI 0 ax [834])
(nil)))
(jump_insn:HI 2453 4359 4454 56 (set (pc)
(if_then_else (eq (reg:CCZ 17 flags)
(const_int 0 [0x0]))
(label_ref 1835)
(pc))) 494 {*jcc_1} (insn_list 4359 (nil))
(expr_list:REG_DEAD (reg:CCZ 17 flags)
(expr_list:REG_BR_PROB (const_int 8448 [0x2100])
(nil))))
When swap_rtx_condition is called on insn 2037, it doesn't find the %ax user
in the same BB, but as the last instruction in the BB is not INSN_P(), it crashes
when trying to dereference it's PATTERN.
--
Summary: ICE in reg-stack.c's swap_rtx_condition
Product: gcc
Version: 3.4.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i386-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21716