------- Comment #11 from dje at gcc dot gnu dot org 2006-08-24 18:19 ------- Created an attachment (id=12128) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12128&action=view) allow immediate load into CRs
Ulrich Weigand pointed out the instruction that is failing is a secondary reload already. Reload fundamentally does not check predicates, so that is a red herring. The bug is an omission in the movcc_internal1 pattern. The secondary reload is trying to load an immediate into a GPR, but the pattern does not provide any alternative for immediate constants. Although PPC CRs themselves generally cannot materialize an immediate constant, a GPR in CC mode loading a constant must be described by the pattern, which it was not. PPC CRs can materialize two constants easily: all zeros and all ones. The particular case in this bug is (const_int 0) and that will be more common, so I also added an alternative to materialize that directly without the secondary reload. -- dje at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #12118|0 |1 is obsolete| | AssignedTo|unassigned at gcc dot gnu |dje at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28753