Comment 3 for bug 710652

Revision history for this message
In , Richard Sandiford (rsandifo) wrote :

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.