Hi Pinski,

On 06/08/15 10:48, pins...@gmail.com wrote:



On Aug 6, 2015, at 11:40 AM, Renlin Li <renlin...@arm.com> wrote:

Hi all,

This is a simple patch to add a new cmovdi_insn_uxtw rtx pattern to aarch64 
backend.

For the following simple test case:

unsigned long
foo (unsigned int a, unsigned int b, unsigned int c)
{
  return a ? b : c;
}

With this new pattern, the new code-generation will be:

    cmp    w0, wzr
    csel    x0, x2, x1, eq
Your example Shows you have the wrong operand types to csel. In the aarch64 abi 
arguments don't need to be zero extended and your csel will not be zero 
extending the arguments.

Yes, I also just realized it. This patch is indeed not correct. Please ignore it.


Note you should also use unsigned long long in the testcase so it is ilp32 and 
llp64l32 friendly.

Yes, I will come up a new one.

Thank you!
Renlin


Thanks,
Andrew



Reply via email to