[PATCH] Add custom lowering for add/sub with overflow ARM
Tim Northover
t.p.northover at gmail.com
Fri May 2 23:40:46 PDT 2014
Hi Louis,
On 3 May 2014 01:43, Louis Gerbarg <lgg at apple.com> wrote:
> The attached patch provides custom lowering of overflow intrinsics for the ARM architecture.
As Pete said, a very good idea!
I think I'd prefer it if the tests also tracked data dependencies as
well as just the instructions used though. If you swapped some
operands around the results might be disastrous.
> add r2, r0, r1
> mov r1, #1
> cmp r2, r0
> movvc r1, #0
Couldn't this be simplified to:
adds r2, r0, r1
mov r1, #1
movvc r1, #0
? This would probably involve adding ARMISD::ADDS and ARMISD::SUBS
nodes (see ARM64 for reference, it already has them).
Cheers.
Tim.
More information about the llvm-commits
mailing list