http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51978
Bug #: 51978 Summary: ext-elim-1.c ICE on powerpc64 Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: ja...@gcc.gnu.org CC: ebotca...@gcc.gnu.org The new testcase apparently ICEs on powerpc64-linux, supposedly -free has been tested solely on x86_64-linux and i686-linux. The problem is that add_removable_* uses note_stores to find the sign/zero extending sets (wonder if it shouldn't use single_set instead, I guess that should be sufficient for x86_64/i686 purposes) but then assumes that the zero/sign extension is in a set right in PATTERN (cand->insn) by passing that as set_pat (from which it uses XEXP (SET_SRC))). The attached untested patch cures the ICE, still I wonder about the single_set instead of note_stores, I'd expect the pass isn't really prepared to handle multiple sets in parallel alongside with sign/zero extension anyway. Additionally, I wonder if some of the PR51667 additions couldn't be dropped again (4.8 material) now that we keep the UD/DU links for the whole duration of the pass.