>> This also eliminate quite a few zero-extensions in the compile.exp testsuite >> at -O2 on the SPARC. Tested on x86-64/Linux and SPARC/Solaris. >> >> >> 2016-11-07 Eric Botcazou <ebotca...@adacore.com> >> >> PR rtl-optimization/59461 >> * doc/rtl.texi (paradoxical subregs): Add missing word. >> * combine.c (reg_nonzero_bits_for_combine): Do not discard results >> in modes with precision larger than that of last_set_mode. >> * rtlanal.c (nonzero_bits1) <SUBREG>: If WORD_REGISTER_OPERATIONS is >> set and LOAD_EXTEND_OP is appropriate, propagate results from inner >> REGs to paradoxical SUBREGs. >> (num_sign_bit_copies1) <SUBREG>: Likewise. Check that the mode is not >> larger than a word before invoking LOAD_EXTEND_OP on it. > > I have installed it after testing on ARM/EABI and IA-64/Linux.
Just a heads-up for now, the above patch introduced following testsuite failures on Alpha [1]: FAIL: gcc.dg/atomic/stdatomic-compare-exchange-1.c -O2 execution test FAIL: gcc.dg/atomic/stdatomic-compare-exchange-1.c -O3 -g execution test FAIL: gcc.dg/atomic/stdatomic-compare-exchange-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none execution test FAIL: gcc.dg/atomic/stdatomic-compare-exchange-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects execution test FAIL: gcc.dg/atomic/stdatomic-compare-exchange-2.c -O2 execution test FAIL: gcc.dg/atomic/stdatomic-compare-exchange-2.c -O3 -g execution test FAIL: gcc.dg/atomic/stdatomic-compare-exchange-2.c -O2 -flto -fno-use-linker-plugin -flto-partition=none execution test FAIL: gcc.dg/atomic/stdatomic-compare-exchange-2.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects execution test On a first look, it looks that something is wrong with sign-extensions. I will try to look into this a bit more. [1] https://gcc.gnu.org/ml/gcc-testresults/2016-11/msg02277.html Uros.