Re: rl78 vs cse vs memory_address_addr_space

2015-07-07 Thread Segher Boessenkool
On Mon, Jul 06, 2015 at 04:58:36PM -0500, Segher Boessenkool wrote: On Mon, Jul 06, 2015 at 04:45:35PM -0400, DJ Delorie wrote: Combine gets as far as this: Trying 5 - 9: Failed to match this instruction: (parallel [ (set (mem/v/j:QI (const_int 240 [0xf0]) [0 MEM[(volatile

Re: rl78 vs cse vs memory_address_addr_space

2015-07-06 Thread Jeff Law
On 07/01/2015 10:14 PM, DJ Delorie wrote: In this bit of code in explow.c: /* By passing constant addresses through registers we get a chance to cse them. */ if (! cse_not_expected CONSTANT_P (x) CONSTANT_ADDRESS_P (x)) x = force_reg (address_mode, x); On the rl78 it

Re: rl78 vs cse vs memory_address_addr_space

2015-07-06 Thread DJ Delorie
Given a test case like this: typedef struct { unsigned char no0 :1; unsigned char no1 :1; unsigned char no2 :1; unsigned char no3 :1; unsigned char no4 :1; unsigned char no5 :1; unsigned char no6 :1; unsigned char no7 :1; } __BITS8; #define

Re: rl78 vs cse vs memory_address_addr_space

2015-07-06 Thread Segher Boessenkool
On Mon, Jul 06, 2015 at 04:45:35PM -0400, DJ Delorie wrote: Combine gets as far as this: Trying 5 - 9: Failed to match this instruction: (parallel [ (set (mem/v/j:QI (const_int 240 [0xf0]) [0 MEM[(volatile union un_per0 *)240B].BIT.no4+0 S1 A16]) (ior:QI (mem/v/j:QI

Re: rl78 vs cse vs memory_address_addr_space

2015-07-06 Thread DJ Delorie
Did you try just a define_split instead? Ugly, but it should work I think. It doesn't seem to be able to match a define_split :-(

rl78 vs cse vs memory_address_addr_space

2015-07-01 Thread DJ Delorie
In this bit of code in explow.c: /* By passing constant addresses through registers we get a chance to cse them. */ if (! cse_not_expected CONSTANT_P (x) CONSTANT_ADDRESS_P (x)) x = force_reg (address_mode, x); On the rl78 it results in code that's a bit too complex for later