This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: FAIL: gcc.c-torture/execute/950628-1.c execution, -O1
- To: dave at hiauly1 dot hia dot nrc dot ca (John David Anglin)
- Subject: Re: FAIL: gcc.c-torture/execute/950628-1.c execution, -O1
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Fri, 19 Jan 2001 16:18:33 -0500 (EST)
- Cc: gcc-bugs at gcc dot gnu dot org
Here is a second crack at understanding why this test fails. The problem
is with the function f. The function g is ok. Remarkably, the problem
is almost identical to what I originally thought was happening in f.
Appended below is the rtl for the function f from the cfg pass. In the next
pass, the register life pass, insns 10, 21, 23, 34, 35 and 46 are deleted.
This is apparently because the MEMs in insns 21, 34 and 46 are placed
on the pbi->mem_set_list but not invalidated. As a consequence, insn_dead_p
determines that the insns with the MEMs are dead.
It can be seen for example that the MEM in insn 46 is referenced latter
in insn 61. Possibly, the MEM is not invalidated on the pbi->mem_set_list
because the reference is indirect via register SI 113.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
;; Function f
(note 1 0 3 ("/xxx/gnu/gcc-2.97/gcc/testsuite/gcc.c-torture/execute/950628-1.c") 19 -1347440721)
(note 3 1 5 NOTE_INSN_FUNCTION_BEG -1347440721)
(note 5 3 7 7affac20 NOTE_INSN_BLOCK_BEG -1347440721)
(note 7 5 8 ("/xxx/gnu/gcc-2.97/gcc/testsuite/gcc.c-torture/execute/950628-1.c") 20 -1347440721)
(note 8 7 99 ("/xxx/gnu/gcc-2.97/gcc/testsuite/gcc.c-torture/execute/950628-1.c") 22 -1347440721)
;; Start of basic block 0, registers live: (nil)
(note 99 8 9 [bb 0] NOTE_INSN_BASIC_BLOCK -1347440721)
(call_insn 9 99 10 (parallel[
(set (reg:DI 28 %r28)
(call (mem:SI (symbol_ref/v:SI ("@g")) 0)
(const_int 16 [0x10])))
(clobber (reg:SI 2 %r2))
(use (const_int 0 [0x0]))
] ) -1 (nil)
(expr_list:REG_EH_REGION (const_int 0 [0x0])
(nil))
(nil))
(insn 10 9 21 (set (reg:SI 95)
(zero_extend:SI (subreg:HI (reg:SI 28 %r28) 0))) 133 {*pa.md:3362} (nil)
(nil))
(insn 21 10 23 (set (mem/s/u:HI (plus:SI (reg/f:SI 3 %r3)
(const_int 16 [0x10])) 0)
(subreg:HI (reg:SI 95) 0)) 91 {*pa.md:2554} (nil)
(nil))
(insn 23 21 34 (set (reg:SI 101)
(zero_extract:SI (reg:SI 29 %r29)
(const_int 16 [0x10])
(const_int 0 [0x0]))) 283 {extzv_32} (nil)
(nil))
(insn 34 23 35 (set (mem/s/u:HI (plus:SI (reg/f:SI 3 %r3)
(const_int 18 [0x12])) 0)
(subreg:HI (reg:SI 101) 0)) 91 {*pa.md:2554} (nil)
(nil))
(insn 35 34 46 (set (reg:SI 107)
(zero_extend:SI (subreg:HI (reg:SI 29 %r29) 0))) 133 {*pa.md:3362} (nil)
(nil))
(insn 46 35 47 (set (mem/s/u:HI (plus:SI (reg/f:SI 3 %r3)
(const_int 20 [0x14])) 0)
(subreg:HI (reg:SI 107) 0)) 91 {*pa.md:2554} (nil)
(nil))
(insn 47 46 49 (set (reg/f:SI 113)
(plus:SI (reg/f:SI 3 %r3)
(const_int 16 [0x10]))) 169 {addsi3} (nil)
(nil))
(insn 49 47 51 (set (reg/f:SI 114)
(plus:SI (reg/f:SI 3 %r3)
(const_int 8 [0x8]))) 169 {addsi3} (nil)
(nil))
(insn 51 49 52 (set (reg:HI 115)
(mem/s/u:HI (reg/f:SI 113) 0)) 91 {*pa.md:2554} (nil)
(nil))
(insn 52 51 53 (set (mem/s:HI (reg/f:SI 114) 0)
(reg:HI 115)) 91 {*pa.md:2554} (nil)
(nil))
(insn 53 52 54 (set (reg/f:SI 114)
(plus:SI (reg/f:SI 3 %r3)
(const_int 10 [0xa]))) 169 {addsi3} (nil)
(nil))
(insn 54 53 56 (set (reg/f:SI 113)
(plus:SI (reg/f:SI 3 %r3)
(const_int 18 [0x12]))) 169 {addsi3} (nil)
(nil))
(insn 56 54 57 (set (reg:HI 116)
(mem/s/u:HI (reg/f:SI 113) 0)) 91 {*pa.md:2554} (nil)
(nil))
(insn 57 56 58 (set (mem/s:HI (reg/f:SI 114) 0)
(reg:HI 116)) 91 {*pa.md:2554} (nil)
(nil))
(insn 58 57 59 (set (reg/f:SI 114)
(plus:SI (reg/f:SI 3 %r3)
(const_int 12 [0xc]))) 169 {addsi3} (nil)
(nil))
(insn 59 58 61 (set (reg/f:SI 113)
(plus:SI (reg/f:SI 3 %r3)
(const_int 20 [0x14]))) 169 {addsi3} (nil)
(nil))
(insn 61 59 62 (set (reg:HI 117)
(mem/s/u:HI (reg/f:SI 113) 0)) 91 {*pa.md:2554} (nil)
(nil))
(insn 62 61 63 (set (mem/s:HI (reg/f:SI 114) 0)
(reg:HI 117)) 91 {*pa.md:2554} (nil)
(nil))
(insn 63 62 64 (set (reg/f:SI 114)
(plus:SI (reg/f:SI 3 %r3)
(const_int 14 [0xe]))) 169 {addsi3} (nil)
(nil))
(insn 64 63 65 (set (reg/f:SI 113)
(plus:SI (reg/f:SI 3 %r3)
(const_int 22 [0x16]))) 169 {addsi3} (nil)
(nil))
(note 65 64 68 ("/xxx/gnu/gcc-2.97/gcc/testsuite/gcc.c-torture/execute/950628-1.c") 23 -1347440721)
(insn 68 65 70 (clobber (reg:SI 118)) -1 (nil)
(nil))
(insn 70 68 71 (set (reg:HI 120)
(mem/s:HI (plus:SI (reg/f:SI 3 %r3)
(const_int 8 [0x8])) 0)) 91 {*pa.md:2554} (nil)
(nil))
(insn 71 70 73 (set (reg:SI 119)
(zero_extend:SI (reg:HI 120))) 133 {*pa.md:3362} (nil)
(nil))
(insn 73 71 74 (set (zero_extract:SI (reg:SI 118)
(const_int 16 [0x10])
(const_int 16 [0x10]))
(reg:SI 119)) 291 {insv_32} (nil)
(nil))
(insn 74 73 76 (clobber (reg:SI 121)) -1 (nil)
(nil))
(insn 76 74 77 (set (reg:HI 123)
(mem/s:HI (plus:SI (reg/f:SI 3 %r3)
(const_int 10 [0xa])) 0)) 91 {*pa.md:2554} (nil)
(nil))
(insn 77 76 79 (set (reg:SI 122)
(zero_extend:SI (reg:HI 123))) 133 {*pa.md:3362} (nil)
(nil))
(insn 79 77 81 (set (zero_extract:SI (reg:SI 121)
(const_int 16 [0x10])
(const_int 0 [0x0]))
(reg:SI 122)) 291 {insv_32} (nil)
(nil))
(insn 81 79 82 (set (reg:HI 125)
(mem/s:HI (plus:SI (reg/f:SI 3 %r3)
(const_int 12 [0xc])) 0)) 91 {*pa.md:2554} (nil)
(nil))
(insn 82 81 84 (set (reg:SI 124)
(zero_extend:SI (reg:HI 125))) 133 {*pa.md:3362} (nil)
(nil))
(insn 84 82 86 (set (zero_extract:SI (reg:SI 121)
(const_int 16 [0x10])
(const_int 16 [0x10]))
(reg:SI 124)) 291 {insv_32} (nil)
(nil))
(insn 86 84 88 (set (subreg:SI (reg:DI 126) 0)
(reg:SI 118)) 69 {*pa.md:2099} (nil)
(nil))
(insn 88 86 90 (set (subreg:SI (reg:DI 126) 1)
(reg:SI 121)) 69 {*pa.md:2099} (nil)
(nil))
(insn 90 88 93 (set (reg/i:DI 28 %r28)
(reg:DI 126)) 122 {*pa.md:3138} (nil)
(nil))
(note 93 90 95 7affac20 NOTE_INSN_BLOCK_END -1347440721)
(note 95 93 98 ("/xxx/gnu/gcc-2.97/gcc/testsuite/gcc.c-torture/execute/950628-1.c") 24 -1347440721)
(insn 98 95 0 (use (reg/i:DI 28 %r28)) -1 (nil)
(nil))
;; End of basic block 0, registers live:
(nil)