https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83565
--- Comment #21 from Sergei Trofimovich <slyfox at inbox dot ru> --- (In reply to Jim Wilson from comment #20) > If nonzero_bits1 isn't changed, then we may need to remove the > WORD_REGISTER_OPERATIONS definition in the ia64 port. Unfortunately, I > don't have access to ia64 hardware, so I can't easily check to see what will > happen if this is done. I've dropped WORD_REGISTER_OPERATIONS locally as: --- gcc/config/ia64/ia64.h (revision 256001) +++ gcc/config/ia64/ia64.h (working copy) @@ -1538,11 +1538,6 @@ #define CASE_VECTOR_PC_RELATIVE 1 -/* Define this macro if operations between registers with integral mode smaller - than a word are always performed on the entire register. */ - -#define WORD_REGISTER_OPERATIONS 1 - and ran 'make check' on clean master compiler and master compiler with this change. 1. The original test case works as expected after removal: # gcc-ia64-no-word-register/host-ia64-unknown-linux-gnu/gcc/xgcc -Bgcc-ia64-no-word-register/host-ia64-unknown-linux-gnu/gcc /a.c -o /a -O1 && /a off>>: 7fffffff # gcc-ia64-clean/host-ia64-unknown-linux-gnu/gcc/xgcc -Bgcc-ia64-clean/host-ia64-unknown-linux-gnu/gcc /a.c -o /a -O1 && /a off>>: ffffffff 2. Result of 'make check' tests: clean: === gcc Summary === # of expected passes 104484 # of unexpected failures 524 # of unexpected successes 36 # of expected failures 528 # of unresolved testcases 2 # of unsupported tests 2093 Executing on host: /root/gcc-ia64-clean/host-ia64-unknown-linux-gnu/gcc/xgcc -v (timeout = 300) spawn /root/gcc-ia64-clean/host-ia64-unknown-linux-gnu/gcc/xgcc -v no-word-register: === gcc Summary === # of expected passes 104484 # of unexpected failures 524 # of unexpected successes 36 # of expected failures 528 # of unresolved testcases 2 # of unsupported tests 2093 Executing on host: /root/gcc-ia64-no-word-register/host-ia64-unknown-linux-gnu/gcc/xgcc -v (timeout = 300) spawn /root/gcc-ia64-no-word-register/host-ia64-unknown-linux-gnu/gcc/xgcc -v Or in diff form: --- clean.log 2017-12-28 00:19:11.897405845 +0000 +++ nwr.log 2017-12-28 00:19:24.497403922 +0000 @@ -10,2 +10,2 @@ -Executing on host: /root/gcc-ia64-clean/host-ia64-unknown-linux-gnu/gcc/xgcc -v (timeout = 300) -spawn /root/gcc-ia64-clean/host-ia64-unknown-linux-gnu/gcc/xgcc -v +Executing on host: /root/gcc-ia64-no-word-register/host-ia64-unknown-linux-gnu/gcc/xgcc -v (timeout = 300) +spawn /root/gcc-ia64-no-word-register/host-ia64-unknown-linux-gnu/gcc/xgcc -v @@ -13 +13 @@ -COLLECT_GCC=/root/gcc-ia64-clean/host-ia64-unknown-linux-gnu/gcc/xgcc +COLLECT_GCC=/root/gcc-ia64-no-word-register/host-ia64-unknown-linux-gnu/gcc/xgcc @@ -18 +18 @@ -/root/gcc-ia64-clean/host-ia64-unknown-linux-gnu/gcc/xgcc version 8.0.0 20171226 (experimental) (GCC) +/root/gcc-ia64-no-word-register/host-ia64-unknown-linux-gnu/gcc/xgcc version 8.0.0 20171226 (experimental) (GCC) @@ -20 +20 @@ -runtest completed at Wed Dec 27 17:05:35 2017 +runtest completed at Wed Dec 27 13:14:17 2017 Surprisingly (or maybe not so surprisingly) no effect! Assembly diff is as expected: --- /a-clean.s 2017-12-28 00:22:22.945376700 +0000 +++ /a-nwr.s 2017-12-28 00:22:56.665371555 +0000 @@ -23,2 +23,2 @@ - dep.z r14 = r15, 8, 24 - ld4.acq r8 = [r12] + dep.z r8 = r15, 8, 24 + ld4.acq r16 = [r12] @@ -27 +27 @@ - mix4.r r14 = r14, r14 + mix4.r r8 = r8, r8 @@ -29 +29 @@ - shr.u r14 = r14, 31 + shr.u r8 = r8, 31 @@ -31 +31 @@ - xor r8 = r8, r14 + xor r8 = r16, r8 @@ -33 +33 @@ - extr.u r8 = r8, 1, 32 + extr.u r8 = r8, 1, 31