Re: [PATCH 0/6] aarch64: Implement TImode comparisons

2020-03-19 Thread Wilco Dijkstra
Hi Richard, > Any compare can be done in at most 2 instructions: > > void doit(void); > void f(long long a) > { > if (a <= 1) > doit(); > } > > f: > cmp r0, #2 > sbcs    r3, r1, #0 > blt .L4 > Well, this one requires that you be able to add 1 to an in

Re: [PATCH 0/6] aarch64: Implement TImode comparisons

2020-03-19 Thread Richard Henderson via Gcc-patches
On 3/19/20 8:47 AM, Wilco Dijkstra wrote: > Hi Richard, > > Thanks for these patches - yes TI mode expansions can certainly be improved! > So looking at your expansions for signed compares, why not copy the optimal > sequence from 32-bit Arm? > > Any compare can be done in at most 2 instructions:

Re: [PATCH 0/6] aarch64: Implement TImode comparisons

2020-03-19 Thread Wilco Dijkstra
Hi Richard, Thanks for these patches - yes TI mode expansions can certainly be improved! So looking at your expansions for signed compares, why not copy the optimal sequence from 32-bit Arm? Any compare can be done in at most 2 instructions: void doit(void); void f(long long a) { if (a <= 1)

[PATCH 0/6] aarch64: Implement TImode comparisons

2020-03-18 Thread Richard Henderson via Gcc-patches
This is attacking case 3 of PR 94174. The existing ccmp optimization happens at the gimple level, which means that rtl expansion of TImode stuff cannot take advantage. But we can to even better than the existing ccmp optimization. This expansion is similar size to our current branchful expansio