/
CT_00_041 - Saturating Arithmetic (GCC)

CT_00_041 - Saturating Arithmetic (GCC)

About

GCC does a fairly poor job at generating efficient code for various saturating arithmetic idioms.  Additionally almost no support for vectorized saturating arithmetic is in place.  This gap will show up in coremark pro and possibly spec2k6.  Followup items may include:

  1. Making sure generated code is amenable to zicond when possible
  2. Moving some of the target specific expansions into generic code

Stakeholders/Partners

RISE:

Intel: 1 Pan Li


External:



Dependencies


Status

Development

DONE


Development Timeline2H2024
Upstreaming

DONE


Upstream Version

gcc-15

Spring 2025




Contacts

Pan Li (Intel)


Dependencies

None



Updates

 

  • The vast majority of this work is done.  If there are followups of significance we'll create a new page.

 

  • Pan Li continues to push improvements to the detection of saturating arithmetic idioms upstream
    • Scalar & Vector with extensive testsuites to verify codegen

  • Pan continues to upstream improvements in detection of scalar and vector saturating arithmetic 

  • New work item.  This work started in 1H2024.

Related content

CT_00_035 -- Improve x264 vectorization
CT_00_035 -- Improve x264 vectorization
More like this
CT_00_037 -- Zicond with if-conversion improvements (GCC)
CT_00_037 -- Zicond with if-conversion improvements (GCC)
Read with this
CT_00_039 - Extension Elimination (GCC)
CT_00_039 - Extension Elimination (GCC)
More like this
2024-2H - Compilers and Toolchains Priorities
2024-2H - Compilers and Toolchains Priorities
Read with this
CT_00_026 -- Vectorize lbm benchmark from spec2017
CT_00_026 -- Vectorize lbm benchmark from spec2017
More like this
CT_00_038 - mem* and str* -- inline expansion in GLIBC implementation
CT_00_038 - mem* and str* -- inline expansion in GLIBC implementation
Read with this