[LLVMbugs] [Bug 11719] New: Vector Alignment Is not Defined for Small Size Vector for Clang Vector Extension on ARM

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jan 6 13:02:33 PST 2012


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

             Bug #: 11719
           Summary: Vector Alignment Is not Defined for Small Size Vector
                    for Clang Vector Extension on ARM
           Product: clang
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: yinma at codeaurora.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 7844
  --> http://llvm.org/bugs/attachment.cgi?id=7844
File to produce the bus err

LLVM/Clang doesn't give the definition for vector type which size is smaller
than 64bit. Without this definition, LLVM/Clang will generate wrong assembly
code for ARM due to incorrect alignment information and cause executable
program bus err. The attached file t.c is the test case to show the bus err. 
"clang  -ccc-host-triple armv7-none-linux-gnueabi -mfloat-abi=softfp -mfpu=neon
-O3 t.c" is the command line. With the optimization, load a short3 will be
promoted to alignment 8 and use ldr.64 to load. ldr.64 is required to have
memory address alignment 4 at least. However, for short3 type, the natural
aligement is alignment 6, with the second element in array, it cannot hold
alignment 4, So the instruction gets bus err.

-- 
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