]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cse.c
re PR rtl-optimization/26244 (FAIL: gcc.c-torture/execute/builtin-bitops-1.c executio...
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Fri, 4 Aug 2006 14:15:37 +0000 (14:15 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Fri, 4 Aug 2006 14:15:37 +0000 (14:15 +0000)
commit824a4527c15e4ae4664a56366030bc4f6e8243b0
tree5409dbf0f47dca9a57cdfb0b9da22af3175d67e5
parent8443c250af760dbb4489b3ff9e75bc334feba4df
re PR rtl-optimization/26244 (FAIL: gcc.c-torture/execute/builtin-bitops-1.c execution,  -O3 -fomit-frame-pointer -funroll-loops)

PR rtl-optimization/26244
* cse.c (fold_rtx): Correctly associate shifts when const_arg1 and/or
inner_const are negative or greater than or equal to the bitsize of
MODE.  If SHIFT_COUNT_TRUNCATED is false, the values aren't associated.
Otherwise, the values are masked using GET_MODE_BITSIZE (mode) - 1.
Simplify complicated if statement.  For ASHIFT and LSHIFTRT, return
CONST0_RTX (mode) when the new shift count is greater than or equal to
to the bitsize of the object being shifted and XEXP (y, 0) has no side
effects.

Co-Authored-By: Roger Sayle <roger@eyesopen.com>
From-SVN: r115924
gcc/ChangeLog
gcc/cse.c