OSDN Git Service

[AArch64] fold 'isPositive' vector integer operations (PR26819)
authorSanjay Patel <spatel@rotateright.com>
Thu, 3 Mar 2016 15:56:08 +0000 (15:56 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 3 Mar 2016 15:56:08 +0000 (15:56 +0000)
commit4cb228fdc820991383563e3eec5510e65e86507c
treef5143cce7f234a53365fd326e51f87bff872b677
parentb77a6ae3ef63f4f35e87a3c0a7bfd895f406c3b0
[AArch64] fold 'isPositive' vector integer operations (PR26819)

This is one of the cases shown in:
https://llvm.org/bugs/show_bug.cgi?id=26819

Shift and negate is what InstCombine prefers to produce (and I tried to make it do more of that
in http://reviews.llvm.org/rL262424 ), so we should recognize that pattern as something that might
come from autovectorization even if it's unlikely to be produced from C NEON intrinsics.

The patch is based on the x86 equivalent:
http://reviews.llvm.org/rL262036

Differential Revision: http://reviews.llvm.org/D17834

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262623 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ISelLowering.cpp
test/CodeGen/AArch64/neon-compare-instructions.ll