[PATCH] [AArch64] Select lower sub, abs pattern to sabd on AArch64

Karthik Bhat kv.bhat at samsung.com
Sun Dec 28 22:29:18 PST 2014


Update patch as SABD subtracts the second vector operand with the first and places the absolute value of difference in destination. 
The pattern in the patch was incorrectly subtracting the first vector opearand with the second.
Updated the patch to generate the correct instruction. i.e.

  sub	v0.4s, v0.4s, v1.4s
  abs	v0.4s, v0.4s

can further be lowered to a single instruction on AArch64-

  sabd	v0.4s, v1.4s, v0.4s and *NOT* sabd	v0.4s, v0.4s, v1.4s

Please let me know if this is good to commit.
Thanks and Regards
Karthik Bhat


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D6781

Files:
  lib/Target/AArch64/AArch64InstrInfo.td
  test/CodeGen/AArch64/arm64-sabd.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6781.17664.patch
Type: text/x-patch
Size: 6370 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141229/fc037b3b/attachment.bin>


More information about the llvm-commits mailing list