This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Constant folding and Constant propagation
- From: Jean Christophe Beyler <jean dot christophe dot beyler at gmail dot com>
- To: Adam Nemet <anemet at caviumnetworks dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 14 Mar 2009 10:01:36 -0400
- Subject: Re: Constant folding and Constant propagation
- References: <4D60B0700D1DB54A8C0C6E9BE691637008EB795E@EXCHANGEVS.IceraSemi.local> <c568a2600902251424s2409ddbv9d1555335a697566@mail.gmail.com> <4D60B0700D1DB54A8C0C6E9BE6916370091E7FE7@EXCHANGEVS.IceraSemi.local> <c568a2600902261127j5a39de55ta6a5db3d980f8b02@mail.gmail.com> <4D60B0700D1DB54A8C0C6E9BE6916370091E8780@EXCHANGEVS.IceraSemi.local> <o7zlg7fyte.fsf@ropi.home> <o77i36s8j0.fsf@ropi.home>
If I replace your lines:
if ((GET_CODE (sets[i].src_elt->exp) == CONST_INT))
insert_const_anchors (dest, sets[i].src_elt, GET_MODE (dest));
with:
if ((GET_CODE (sets[i].src_elt->exp) == CONST_INT) && (INTVAL
(sets[i].src_elt->exp) != 0))
insert_const_anchors (dest, sets[i].src_elt, GET_MODE (dest));
it does not fail anymore since I remove the 0 corner case I am seeing.
I fail to see why it is a problem however. Like I said previously, it
might be a problem with my target architecture but I fail to see why 0
is considered differently in the target files.
Jc