https://bugs.llvm.org/show_bug.cgi?id=35360
Bug ID: 35360
Summary: [GlobalISel][AArch64] Calling convention for vectors
incorrect on big-endian targets
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: GlobalISel
Assignee: unassignedb...@nondot.org
Reporter: oliver.stann...@arm.com
CC: llvm-bugs@lists.llvm.org
Global-isel generates incorrect code when targeting big-endian AArch64 for this
code:
#include <arm_neon.h>
int32x2_t load_vector(int32x2_t *p) {
return *p;
}
Global-isel generates this:
// armclang --target=aarch64-arm-none-eabi -march=armv8-a -c callees.cpp -O0
-Wall -std=c++11 -mllvm -global-isel=true -mllvm -global-isel-abort=0
-mbig-endian -o - -S
_Z11load_vectorP11__Int32x2_t: // @_Z11load_vectorP11__Int32x2_t
// BB#0: // %entry
sub sp, sp, #16 // =16
str x0, [sp, #8]
ldr x0, [sp, #8]
ld1 { v0.2s }, [x0]
add sp, sp, #16 // =16
ret
With global-isel off, there is a rev64 instruction between the ld1 and the add,
which fixes up the endianness of the vector.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs