aboutsummaryrefslogtreecommitdiff
path: root/gotools
diff options
context:
space:
mode:
authorJim Wilson <jimw@sifive.com>2018-05-17 22:37:38 +0000
committerJim Wilson <wilson@gcc.gnu.org>2018-05-17 15:37:38 -0700
commit7bbce9b50302959286381d9177818642bceaf301 (patch)
tree0ce4f20f1d1ab9a42ba1843c8d03e69332f11446 /gotools
parent4e0684beff1fcd8398425b1fbe237cdbcb34c359 (diff)
downloadgcc-7bbce9b50302959286381d9177818642bceaf301.zip
gcc-7bbce9b50302959286381d9177818642bceaf301.tar.gz
gcc-7bbce9b50302959286381d9177818642bceaf301.tar.bz2
RISC-V: Optimize switch with sign-extended index.
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. * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode test, check for sign extended subreg and/or constant operands, and do a sign extend in that case. gcc/testsuite/ * gcc.target/riscv/switch-qi.c: New. * gcc.target/riscv/switch-si.c: New. From-SVN: r260340
Diffstat (limited to 'gotools')
0 files changed, 0 insertions, 0 deletions