This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Another case of DCE deleting live code
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: rth at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 2 Nov 04 19:33:37 EST
- Subject: Re: Another case of DCE deleting live code
> # FRAME.2_2 = V_MAY_DEF <FRAME.2_1>;
> FRAME.2.proc2GP222__b1 = "ABCD";
> CHAIN.3_3 = &FRAME.2;
> proc2GP222__b1.0_4 = &CHAIN.3_3->proc2GP222__b1;
> proc2GP222__b1.1_5 = (character[1 .. 4] *) proc2GP222__b1.0_4;
> # TMT.5_8 = V_MAY_DEF <TMT.5_7>;
> D.410_6 = __builtin_memcmp ("ABCD", proc2GP222__b1.1_5, 4);
> if (D.410_6 != 0) goto <L0>; else goto <L3>;
In what way is FRAME.2.proc2GP222___b1 not dead? Looks to me
that it is. Looks to me that "ABCD" got copy-propagated into
the memcmp call.
No. There are *two* "ABCD" constants here. Both arguments of memcmp are
supposed to have that value. One was always there. The other operand
takes the address of CHAIN.3_3->proc2GP222__b1, but CHAIN.3_3 = &FRAME.2.