This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH - Fix an ICE compiling for ppc64


Fariborz Jahanian <fjahanian@apple.com> writes:

> Attached patch fixes an ICE compiling the test case with: -m64 -O1
> -static. -m64 is Apple's ppc64 ABI option. Problem arises after
> 'combine' phase combines a series of true-dependent rtl insns into a
> single compare insn involving an integer constant. However, constant
> in this pattern does not meet the constraint laid down in rs6000.md
> pattern for integer constants. Reload then attempts to move this
> constant into a register via memory. Generated pattern to do the
> 'move' causes an invalid insn.

This last sentence is the problem.  Reload should be able to move
any constant into a register.

> (insn 136 135 41 1 (set (reg:DI 2 r2)
>          (mem/u/i:DI (symbol_ref/u:DI ("*LC1") [flags 0x2]) [0 S8
> A64])) -1 (nil)
>      (nil))

Most likely the problem is in the chunk of code in rs6000_emit_move
that starts with:

      if ((TARGET_ELF || DEFAULT_ABI == ABI_DARWIN)
          && TARGET_NO_TOC
          && ! flag_pic
          && mode == Pmode
          && CONSTANT_P (operands[1])
          && GET_CODE (operands[1]) != HIGH
          && GET_CODE (operands[1]) != CONST_INT)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]