On Thu, Mar 27, 2014 at 10:33 AM, James Greenhalgh
<[email protected]> wrote:
> Hi,
>
> Next, comparisons, flag setting operations and IF_THEN_ELSE.
>
> Tested on aarch64-none-elf.
>
> Ok for stage 1?
This broke building the Linux kernel.
A simple testcase:
unsigned grab_cache_page_write_begin(unsigned flags, unsigned capabilities)
{
unsigned gfp_mask;
unsigned gfp_notmask = 0;
gfp_mask = flags & ((1 << 25) - 1);
if (!(capabilities & 0x00000001))
gfp_mask |= 0x1000000u;
return (gfp_mask & ~gfp_notmask);
}
---- CUT ----
The problem is combine creates the following RTL:
(if_then_else:SI (reg:SI 78 [ D.2578 ])
(const_int 0 [0])
(const_int 16777216 [0x1000000]))
Which the code you added does not handle. I am going to fix this but
I need to re-factor this code. I am going to place the code for
IF_THEN_ELSE in its own function also since it is getting too large
for my taste.
Thanks,
Andrew Pinski
>
> Thanks,
> James
>
> ---
> 2014-03-27 James Greenhalgh <[email protected]>
> Philipp Tomsich <[email protected]>
>
> * config/aarch64/aarch64.c (aarch64_rtx_costs): Cost comparison
> operators.