Re: [Patch/combine] PR64304 wrong bitmask passed to force_to_mode in combine_simplify_rtx

2015-01-09 Thread Jiong Wang
2015-01-09 21:29 GMT+00:00 Andrew Pinski : > On Fri, Jan 9, 2015 at 12:40 PM, Jeff Law wrote: >> On 01/09/15 06:39, Jiong Wang wrote: >>> >>> as reported at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64304 >>> >>> given the following test: >>> >>> unsigned char byte = 0; >>> >>> void set_bit(uns

Re: [Patch/combine] PR64304 wrong bitmask passed to force_to_mode in combine_simplify_rtx

2015-01-09 Thread Andrew Pinski
On Fri, Jan 9, 2015 at 12:40 PM, Jeff Law wrote: > On 01/09/15 06:39, Jiong Wang wrote: >> >> as reported at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64304 >> >> given the following test: >> >> unsigned char byte = 0; >> >> void set_bit(unsigned int bit, unsigned char value) { >> unsigned

Re: [Patch/combine] PR64304 wrong bitmask passed to force_to_mode in combine_simplify_rtx

2015-01-09 Thread Jeff Law
On 01/09/15 06:39, Jiong Wang wrote: as reported at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64304 given the following test: unsigned char byte = 0; void set_bit(unsigned int bit, unsigned char value) { unsigned char mask = (unsigned char)(1 << (bit & 7)); if (!value) {

[Patch/combine] PR64304 wrong bitmask passed to force_to_mode in combine_simplify_rtx

2015-01-09 Thread Jiong Wang
as reported at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64304 given the following test: unsigned char byte = 0; void set_bit(unsigned int bit, unsigned char value) { unsigned char mask = (unsigned char)(1 << (bit & 7)); if (!value) { byte &= (unsigned char)~mask; } else