[LLVMbugs] [Bug 8036] New: ARM NEON intrinsics vget_low_u8, etc produce inefficient code

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Aug 31 02:06:05 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=8036

           Summary: ARM NEON intrinsics vget_low_u8, etc produce
                    inefficient code
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: Edmund.Grimley-Evans at arm.com
                CC: llvmbugs at cs.uiuc.edu


At revision 112593.

Command line:

Debug+Asserts/bin/clang -cc1 -triple thumbv7-eabi -target-cpu cortex-a8 -I
Debug+Asserts/lib/clang/2.8/include -I ... n.c -O3 -S -o n.s

Source file:

#include <arm_neon.h>

void ff(const void *p, void *q)
{
  uint8x16_t x = vld1q_u8(p);
  uint8x8_t a = vget_low_u8(x);
  uint8x8_t b = vget_high_u8(x);
  uint8x16_t y = vcombine_u8(a, b);
  vst1q_u8(q, y);
}

Assembler output:

ff:
    vld1.8    {d0, d1}, [r0]
    vmov.32    r12, d1[1]
    vmov.32    r3, d1[0]
    vmov.32    r0, d0[0]
    vmov.32    r2, d0[1]
    vmov    s3, r12
    vmov    s2, r3
    vmov    s1, r2
    vmov    s0, r0
    vst1.8    {d0, d1}, [r1]
    bx    lr

This probably has something to do with the use of casts to i64. See LLVM bug
7988.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list