[llvm-bugs] [Bug 48257] New: vget_lane_p64 triggers -Wvector-conversion diagnostic
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Nov 21 23:27:52 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=48257
Bug ID: 48257
Summary: vget_lane_p64 triggers -Wvector-conversion diagnostic
Product: new-bugs
Version: 11.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: clang at evan.coeusgroup.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
vget_lane_p64 is defined in arm_neon.h as:
#define vget_lane_p64(__p0, __p1) __extension__ ({ \
poly64x1_t __s0 = __p0; \
poly64_t __ret; \
__ret = (poly64_t) __builtin_neon_vget_lane_i64((poly64x1_t)__s0, __p1); \
__ret; \
})
Note the cast on the first argument to __builtin_neon_vget_lane_i64;
vget_lane_i64 takes an int64x1_t, not a poly64x1_t, so code which calls this
macro ends up emitting a -Wvector-conversion diagnostic:
error: incompatible vector types passing 'poly64x1_t' (vector of 1 'poly64_t'
value) to parameter of type '__attribute__((__vector_size__(1 * sizeof(long))))
long' (vector of 1 'long' value) [-Werror,-Wvector-conversion]
For an example, you can use:
#include <arm_neon.h>
poly64_t foo (poly64x1_t v);
poly64_t
foo (poly64x1_t v) {
return vget_lane_p64(v, 0);
}
Or, on Compiler Explorer: https://godbolt.org/z/GWf6fq
It looks like this is a problem on all the vget*_lane_p64 functions.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201122/bbb4f643/attachment.html>
More information about the llvm-bugs
mailing list