https://llvm.org/bugs/show_bug.cgi?id=23408

            Bug ID: 23408
           Summary: [AArch64] Incorrect code generation
           Product: libraries
           Version: 3.6
          Hardware: PC
                OS: All
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: Backend: AArch64
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Compiling the following code with any level of optimization above -O0 produces
incorrect assembly for AArch64.

====

typedef struct {float v[2];} vec2;
typedef struct {float v[3];} vec3;

vec2 getVec2();

vec3 getVec3()
{
 vec2 myVec = getVec2();

 vec3 res;
 res.v[0] = myVec.v[0];
 res.v[1] = myVec.v[1];
 res.v[2] = 1;
 return res;
}

====

$ clang -arch arm64 -O1 test.c -S -o - 
    .section    __TEXT,__text,regular,pure_instructions
    .globl    _getVec3
    .align    2
_getVec3:                               ; @getVec3
; BB#0:
    b    _getVec2

====

I haven't tested trunk, but the bug occurs on both the 3.6.0 and 3.5.2 binary
releases for OS X from the llvm.org download page, as well as the Apple LLVM
6.1 and 6.0 compilers shipped with Xcode 6.3 and 6.2 respectively.

I'm guessing it's an AArch64 backend issue, at least the armv7 code appears
correct for this test case.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to