[Bug middle-end/68664] [6/7 Regression] Speculative sqrt in c-ray main loop causes large slow down

aldyh at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Jan 28 14:07:00 GMT 2017


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

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aldyh at gcc dot gnu.org

--- Comment #7 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
On both aarch64 and ppc64, this starts happening after scheduling changes:

commit 08993ad1c669cab64baf352f79cd7f8584dd8e0c
Author: jgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Oct 1 09:33:40 2015 +0000

    [Patch 2/2 ARM/AArch64] Add a new Cortex-A53 scheduling model

        * config/arm/aarch-common-protos.h
        (aarch_accumulator_forwarding): New.
        (aarch_forward_to_shift_is_not_shifted_reg): Likewise.
        * config/arm/aarch-common.c (aarch_accumulator_forwarding): New.
        (aarch_forward_to_shift_is_not_shifted_reg): Liekwise.
        * config/arm/cortex-a53.md: Rewrite.

and

commit 5379d8d457b300219d3d8eda38caaa9916f98078                               
Author: dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>                        
Date:   Mon Jan 19 18:33:24 2015 +0000                                         
                                                                               
          * config/rs6000/default64.h: Include rs6000-cpus.def.                
         (TARGET_DEFAULT) [LITTLE_ENDIAN]: Use ISA 2.7 (POWER8).               
        (TARGET_DEFAULT) [BIG_ENDIAN]: Use POWER4.                             
       * config/rs6000/driver-rs6000.c (detect_processor_aix): Add POWER7      
      and POWER8.                                                              
     * config/rs6000/linux64.h (PROCESSOR_DEFAULT64): Always default to        
    POWER8.                                                                    
   * config/rs6000/rs6000.c (rs6000_file_start): Emit .machine                 
  pseudo-op to specify assembler dialect.

There is further analysis by James on bz#77468.

On arm-eabi -mhard-float I was not able to reproduce, so perhaps we could
remove the arm-*-* target, and just leave aarch64.

Note, the speculative execution of sqrt on both aarch64 and ppc64 happens in
the sched1 rtl pass.


More information about the Gcc-bugs mailing list