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 v2] PR rtl-optimization/83565: Fix 32-bit rotate on ia64


On 12/23/2017 04:36 PM, James Clarke wrote:
	PR rtl-optimization/83565
	* gcc/config/ia64/ia64.md ("*rotrsi3_internal"): Mask out higher 32
	bits from the shift result.
	("*rotlsi3_internal"): Likewise

This doesn't look right to me. On ia64, the upper 32-bits of a 32-bit value in a 64-bit register are garbage bits. So there should be no need to clear them here after the operation.

Note for instance that lshrsi3 clears the upper 32-bits before shifting right, because they are garbage bits. And note for instance that ashlsi3 just shifts left, and doesn't care that it is putting garbage in the upper 32-bits.

I think either nonzero bits is broken in the SUBREG case, or ia64 perhaps should not be setting WORD_REGISTER_OPERATIONS.

Jim


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