Bug ID: 77670
           Summary: PowerPC64 Spec 2006 fails on 453.povray using
                    -mcpu=power9 -mpower9-minmax
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot
          Reporter: meissner at gcc dot
  Target Milestone: ---

Created attachment 39662
-save-temps file (cut down) that shows the problem

The new min/max instructions in PowerPC ISA 3.0 generate an insn not found
error.  Note, these instructions are not currently enabled with -mcpu=power9,
they are enabled with a separate switch: -mpower9-minmax.  It is likely that
the same bug appears in GCC 6.2.

To replicate, compile the attached .ii file with -O3 -mcpu=power9
-mpower9-minmax -ffast-math -w.  The following error is generated:

hcmplx.cpp: In function 'void pov::Normal_Calc_HCompl_Reciprocal(double*, int,
hcmplx.cpp:891:1: error: unrecognizable insn:
(insn 62 61 63 5 (parallel [
            (set (reg:DF 305)
                (if_then_else:DF (ne:CCFP (reg:DF 310)
                        (reg/v:DF 230 [ det ]))
                    (reg:DF 309)
                    (reg/v:DF 203 [ xx ])))
            (clobber (scratch:V2DI))
        ]) -1
hcmplx.cpp:891:1: internal compiler error: in extract_insn, at recog.c:2310
0x10a83fe3 _fatal_insn(char const*, rtx_def const*, char const*, int, char
0x10a84047 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
0x10a49a1b extract_insn(rtx_insn*)
0x10791fbb instantiate_virtual_regs_in_insn
0x10791fbb instantiate_virtual_regs
0x10791fbb execute
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <> for instructions.

Similar errors occur on the gamess and soplex benchmarks.

The reason this occurs it creates a floating point CMOVE instruction with a NE.
 The way to fix it is to provide insns to invert the sense of the test.

Reply via email to