http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51933
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 #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-01-21
21:27:40 UTC ---
> But then when make_defs_and_copies_lists is called on the QImode -> DImode
> extension, we reach:
> /* Initialize the work list. */
> if (!get_defs (extend_insn, src_reg, &work_list))
> {
> VEC_free (rtx, heap, work_list);
> /* The number of defs being equal to zero can only mean that all the
> definitions have been previously merged. */
> return 2;
> }
> and because the definition has been changed already. But nothing performs the
> ext_src_mode check that used to be performed otherwise.
> So we either need to do the src mode checking earlier when we haven't started
> modifying insns (in add_removable_extension?), or we'd need to look even at
> the
> newly added defs and see what mode they extend from.
OK, I didn't realize that there could be an implicit truncation hidden within
an extension. And I think that your change to add_removable_extension is fine,
as it still leaves the new flavor of the pass more powerful than the old one.
The other PR is a different problem.