This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/12792] {u,}int64_t variables are incorrectly reported as used uninitialized
- From: "mycroft at netbsd dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Oct 2003 20:52:21 -0000
- Subject: [Bug optimization/12792] {u,}int64_t variables are incorrectly reported as used uninitialized
- References: <20031027185145.12792.chris@pin.lu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12792
------- Additional Comments From mycroft at netbsd dot org 2003-10-28 20:52 -------
Created an attachment (id=5014)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5014&action=view)
proposed fix
The problem is thus:
* The {u,}mulsidi3 generate two parallel sets which modify the upper and lower
halves of the target register.
* life_analysis() does not track subregister modifications -- if you don't
modify the whole register with a single set, it considers the register
unused.
The simple, if klugy, solution to this is to stick an explicit clobber in. It
seems to work.
While doing this, I noticed that constant folding was not happening for
32x32->64 multiplies. This is because the parallel set generated by
{u,}mulsidi3 cannot be folded at all. To solve this, I first expand to a
normal multiply, and then use a define_insn_and_split to convert it to the
parallel set after CSE and constant folding.