This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/51821] [4.5/4.6/4.7 Regression] 64bit > 32bit conversion produces incorrect results with optimizations
- From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 12 Jan 2012 13:20:01 +0000
- Subject: [Bug rtl-optimization/51821] [4.5/4.6/4.7 Regression] 64bit > 32bit conversion produces incorrect results with optimizations
- Auto-submitted: auto-generated
- References: <bug-51821-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51821
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEW
AssignedTo|ebotcazou at gcc dot |unassigned at gcc dot
|gnu.org |gnu.org
--- Comment #15 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-01-12 13:20:01 UTC ---
> Please look into "peep2_insn_data[from].live_before" array and
> "peep2_insn_data[from+1].live_before". You will see that the difference is
> only in ax register. This array is set with df_simulate_one_insn_forwards,
> and this particular function indeed clears set hard registers when REG_UNUSED
> note is found (this is OK for live analysis).
I did and saw exactly that. The problem is that I missed the REG_UNUSED note
for edx among the 3 other notes (and also that you specifically mentioned it in
the comment #9). OK, DF appears to be correct here, or at least consistent.
> and since the difference between live registers before/after the insn is only
> ax register, the loop claims others (including dx reg) as "available". The
> calculation, which register is _NOT_CLOBBERED_ by the pattern from "live"
> information is thus not enough, we have to look into the pattern and mark all
> hard registers that are set or clobbered as _NOT_AVAILABLE_ in the register
> set.
Yes, this seems to be the correct approach.