]> granicus.if.org Git - clang/commit
ARM: Emit normal IR for vaddhn/vsubhn NEON intrinsics
authorTim Northover <tnorthover@apple.com>
Wed, 28 Aug 2013 09:46:37 +0000 (09:46 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 28 Aug 2013 09:46:37 +0000 (09:46 +0000)
commit6bf1e8eadd36f077cf5403d23c664129d98eaf79
treef6db658d861c33850f14aed4248c028f3b2fa32e
parentb1c09b913e331824da29f8017452b6171f7eccbc
ARM: Emit normal IR for vaddhn/vsubhn NEON intrinsics

These operations "vector add high-half narrow" actually correspond to the
sequence:

    %sum = add <4 x i32> %lhs, %rhs
    %high = lshr <4 x i32> %sum, <i32 16, i32 16, i32 16, i32 16>
    %res = trunc <4 x i32> %high to <4 x i16>

Now that LLVM can spot this, Clang should emit the corresponding LLVM IR.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189463 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGBuiltin.cpp