ARM neon vld1q_lane_u8 & co. don't accept lanes >= 8
Bug #710652 reported by
Richard Sandiford
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro GCC |
Fix Released
|
Low
|
Richard Sandiford | ||
Linaro GCC Tracking |
Fix Released
|
Undecided
|
Richard Sandiford | ||
gcc |
Fix Released
|
Medium
|
|||
gcc-4.5 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The testcase:
#include <arm_neon.h>
uint8x16_t
foo (uint8_t *a, uint8x16_t b)
{
vst1q_lane_u8 (a, b, 14);
return vld1q_lane_u8 (a + 0x100, b, 15);
}
fails with:
error: argument must be a constant
The v{ld,st}
between 0 and 15. The function is then converted to a vld1 or vst1 of one half
of the quad value. The problem is that the lane predicate doesn't account for
this, and only accepts the 0..7 range that are supported by vld1 and vst1.
The error could be a bit friendlier too; maybe "argument out of range" or
something. That's a problem in a separate piece of code though, so I'm not
treating it as part of this bug.
Related branches
lp://staging/~rsandifo/gcc-linaro/lp-710652
- Andrew Stubbs (community): Approve
-
Diff: 43 lines (+22/-1)3 files modifiedChangeLog.linaro (+8/-0)
gcc/config/arm/predicates.md (+1/-1)
gcc/testsuite/gcc.target/arm/neon-vld-1.c (+13/-0)
Rejected
for merging
into
lp://staging/gcc-linaro/4.5
- Linaro Toolchain Developers: Pending requested
lp://staging/~rsandifo/gcc-linaro/lp-710652-4.5
- Andrew Stubbs (community): Approve
-
Diff: 48 lines (+24/-1)3 files modifiedChangeLog.linaro (+10/-0)
gcc/config/arm/predicates.md (+1/-1)
gcc/testsuite/gcc.target/arm/neon-vld-1.c (+13/-0)
Changed in gcc-linaro: | |
assignee: | nobody → Richard Sandiford (rsandifo) |
status: | New → In Progress |
Changed in gcc-linaro: | |
importance: | Undecided → Low |
Changed in gcc: | |
importance: | Unknown → Medium |
status: | Unknown → In Progress |
Changed in gcc-linaro: | |
status: | Fix Committed → Fix Released |
Changed in gcc-linaro-tracking: | |
status: | In Progress → Fix Released |
Changed in gcc: | |
status: | In Progress → Fix Released |
tags: | added: 46merge |
To post a comment you must log in.
The testcase:
#include <arm_neon.h>
uint8x16_t
foo (uint8_t *a, uint8x16_t b)
{
vst1q_lane_u8 (a, b, 14);
return vld1q_lane_u8 (a + 0x100, b, 15);
}
fails with:
error: argument must be a constant
The v{ld,st} 1q_lane_ {u,s,p} 8 intrinsic functions are supposed to take a range between 0 and 15. The function is then converted to a vld1 or vst1 of one half of the quad value. The problem is that the lane predicate doesn't account for this, and only accepts the 0..7 range that are supported by vld1 and vst1.
The error could be a bit friendlier too; maybe "argument out of range" or something. That's a problem in a separate piece of code though, so I'm not treating it as part of this bug.