(match_operand:<V_elem> 1 "nonimmediate_operand" "Um,r"))
(match_operand:VD_LANE 3 "s_register_operand" "0,0")
(match_operand:SI 2 "immediate_operand" "i,i")))]
- "TARGET_NEON"
+ "TARGET_NEON
+ && (GET_MODE_NUNITS (<MODE>mode)
+ > (unsigned) exact_log2 (INTVAL (operands[2])))"
{
int elt = ffs ((int) INTVAL (operands[2])) - 1;
if (BYTES_BIG_ENDIAN)
(match_operand:<V_elem> 1 "nonimmediate_operand" "Um,r"))
(match_operand:VQ2 3 "s_register_operand" "0,0")
(match_operand:SI 2 "immediate_operand" "i,i")))]
- "TARGET_NEON"
+ "TARGET_NEON
+ && (GET_MODE_NUNITS (<MODE>mode)
+ > (unsigned) exact_log2 (INTVAL (operands[2])))"
+
{
HOST_WIDE_INT elem = ffs ((int) INTVAL (operands[2])) - 1;
int half_elts = GET_MODE_NUNITS (<MODE>mode) / 2;
(match_operand:DI 1 "nonimmediate_operand" "Um,r"))
(match_operand:V2DI_ONLY 3 "s_register_operand" "0,0")
(match_operand:SI 2 "immediate_operand" "i,i")))]
- "TARGET_NEON"
+ "TARGET_NEON
+ && (GET_MODE_NUNITS (<MODE>mode)
+ > (unsigned) exact_log2 (INTVAL (operands[2])))"
{
HOST_WIDE_INT elem = ffs ((int) INTVAL (operands[2])) - 1;
int regno = REGNO (operands[0]) + 2 * elem;
--- /dev/null
+/* { dg-options "-O2 -fno-inline" } */
+/* { dg-add-options arm_neon } */
+#include <stdint.h>
+#include "arm_neon.h"
+
+volatile uint8_t v40 = 255;
+
+volatile uint8x8_t result = {
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ 0, 0, 0, 0, 0, 0, 0, 255
+#else
+ 255, 0, 0, 0, 0, 0, 0, 0
+#endif
+};
+
+void check (uint8x8_t v)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ if (v[i] != result[i])
+ __builtin_abort ();
+}
+
+int main ()
+{
+ uint8_t v116[16] = {0};
+ uint8x8_t v117 = vld1_dup_u8(v116); // 0, ..., 0
+ uint8x8_t v119 = vset_lane_u8(v40, v117, 7); // 0, ..., 0, 0xff
+ check (v119);
+
+ return 0;
+}