mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-14 14:33:40 +08:00
re PR rtl-optimization/29797 (Miscompiles bit test / set in OpenOffice)
2006-11-12 Michael Matz <matz@suse.de> Roger Sayle <roger@eyesopen.com> PR rtl-optimization/29797 * ifcvt.c (noce_try_bitop): Correct calculation of bitnum on BITS_BIG_ENDIAN targets. * gcc.c-torture/execute/pr29797-1.c: New test case. From-SVN: r118740
This commit is contained in:
parent
d3a6450e36
commit
3b279c7ae7
@ -1,3 +1,10 @@
|
||||
2006-11-12 Michael Matz <matz@suse.de>
|
||||
Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
PR rtl-optimization/29797
|
||||
* ifcvt.c (noce_try_bitop): Correct calculation of bitnum on
|
||||
BITS_BIG_ENDIAN targets.
|
||||
|
||||
2006-11-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* builtins.c (fold_builtin_cosh): New.
|
||||
|
@ -1943,7 +1943,9 @@ noce_try_bitop (struct noce_if_info *if_info)
|
||||
return FALSE;
|
||||
bitnum = INTVAL (XEXP (cond, 2));
|
||||
mode = GET_MODE (x);
|
||||
if (bitnum >= HOST_BITS_PER_WIDE_INT)
|
||||
if (BITS_BIG_ENDIAN)
|
||||
bitnum = GET_MODE_BITSIZE (mode) - 1 - bitnum;
|
||||
if (bitnum < 0 || bitnum >= HOST_BITS_PER_WIDE_INT)
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-11-12 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
PR rtl-optimization/29797
|
||||
* gcc.c-torture/execute/pr29797-1.c: New test case.
|
||||
|
||||
2006-11-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* gcc.dg/torture/builtin-symmetric-1.c: Add more cases.
|
||||
|
14
gcc/testsuite/gcc.c-torture/execute/pr29797-1.c
Normal file
14
gcc/testsuite/gcc.c-torture/execute/pr29797-1.c
Normal file
@ -0,0 +1,14 @@
|
||||
extern void abort(void);
|
||||
|
||||
unsigned int bar(void) { return 32768; }
|
||||
|
||||
int main()
|
||||
{
|
||||
unsigned int nStyle = bar ();
|
||||
if (nStyle & 32768)
|
||||
nStyle |= 65536;
|
||||
if (nStyle != (32768 | 65536))
|
||||
abort ();
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user