https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79752

            Bug ID: 79752
           Summary: incorrect code generation for __divkf3 with -O2
                    -mcpu=power9
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acsawdey at gcc dot gnu.org
                CC: meissner at gcc dot gnu.org, wschmidt at gcc dot gnu.org
  Target Milestone: ---
            Target: powerpc64*-*-*

Created attachment 40845
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40845&action=edit
reduced test case

Trunk 245614 is generating incorrect code for the software version of divkf3
with -mcpu=power9. With -mcpu=power8, correct code is generated.

I've applied multidelta to this test case but it wasn't able to remove much.

gcc/xgcc -Bgcc/ -O2 -mcpu=power9 -o divkf3bug divkf3bug.c
./divkf3bug
a=2.000000 b=3.000000 r=1.999999

gcc/xgcc -Bgcc/ -O2 -mcpu=power8 -o divkf3bug divkf3bug.c
./divkf3bug
a=2.000000 b=3.000000 r=0.666667

Reply via email to