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 1/2, expr.c] Optimize switch with sign-extended index.


On Wed, May 2, 2018 at 3:05 PM, Jim Wilson <jimw@sifive.com> wrote:
> This improves the code for a switch statement on targets that sign-extend
> function arguments, such as RISC-V.  Given a simple testcase
> ...
>         gcc/
>         * expr.c (do_tablejump): When converting index to Pmode, if we have a
>         sign extended promoted subreg, and the range does not have the sign bit
>         set, then do a sign extend.

Ping.

Jim


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