// RUN: not llvm-mc -triple thumb-none-linux-gnu -mattr=+v8.3a,+neon,+fullfp16 -show-encoding < %s 2>%t | FileCheck %s --check-prefix=THUMB --check-prefix=FP16-THUMB
// RUN: FileCheck --check-prefix=STDERR --check-prefix=NEON-STDERR <%t %s
// RUN: not llvm-mc -triple arm-none-linux-gnu -mattr=+v8.3a,+neon,+fullfp16 -show-encoding < %s 2>%t | FileCheck %s --check-prefix=ARM --check-prefix=FP16-ARM
// RUN: FileCheck --check-prefix=STDERR --check-prefix=NEON-STDERR <%t %s
// RUN: not llvm-mc -triple thumb-none-linux-gnu -mattr=+v8.3a,+neon,-fullfp16 -show-encoding < %s 2>%t | FileCheck %s --check-prefix=THUMB
// RUN: FileCheck --check-prefix=STDERR --check-prefix=NO-FP16-STDERR --check-prefix=NEON-STDERR <%t %s
// RUN: not llvm-mc -triple arm-none-linux-gnu -mattr=+v8.3a,+neon,-fullfp16 -show-encoding < %s 2>%t | FileCheck %s --check-prefix=ARM
// RUN: FileCheck --check-prefix=STDERR --check-prefix=NO-FP16-STDERR --check-prefix=NEON-STDERR <%t %s
// RUN: not llvm-mc -triple thumb-none-linux-gnu -mattr=+v8.3a,-neon,+fullfp16 -show-encoding < %s 2>%t
// RUN: FileCheck --check-prefix=STDERR --check-prefix=NO-NEON-STDERR <%t %s
// RUN: not llvm-mc -triple arm-none-linux-gnu -mattr=+v8.3a,-neon,+fullfp16 -show-encoding < %s 2>%t
// RUN: FileCheck --check-prefix=STDERR --check-prefix=NO-NEON-STDERR <%t %s
// RUN: not llvm-mc -triple thumb-none-linux-gnu -mattr=+v8.2a,+neon,+fullfp16 -show-encoding < %s 2>&1 | FileCheck %s --check-prefix=V82A
// RUN: not llvm-mc -triple arm-none-linux-gnu -mattr=+v8.2a,+neon,+fullfp16 -show-encoding < %s 2>&1 | FileCheck %s --check-prefix=V82A
/* ==== VCMLA vector ==== */
// Valid types
vcmla.f16 d0, d1, d2, // FP16-ARM: vcmla.f16 d0, d1, d2, // FP16-THUMB: vcmla.f16 d0, d1, d2, // NO-FP16-STDERR: :[[@LINE-3]]:{{[0-9]*}}: note: instruction requires: full half-float
// V82A: :[[@LINE-4]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-5]]:{{[0-9]*}}: error: instruction requires: NEON
vcmla.f16 q0, q1, q2, // FP16-ARM: vcmla.f16 q0, q1, q2, // FP16-THUMB: vcmla.f16 q0, q1, q2, // NO-FP16-STDERR: :[[@LINE-3]]:{{[0-9]*}}: note: instruction requires: full half-float
// V82A: :[[@LINE-4]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-5]]:{{[0-9]*}}: error: instruction requires: NEON
vcmla.f32 d0, d1, d2, // ARM: vcmla.f32 d0, d1, d2, // THUMB: vcmla.f32 d0, d1, d2, // V82A: :[[@LINE-3]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-4]]:{{[0-9]*}}: error: instruction requires: NEON
vcmla.f32 q0, q1, q2, // ARM: vcmla.f32 q0, q1, q2, // THUMB: vcmla.f32 q0, q1, q2, // V82A: :[[@LINE-3]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-4]]:{{[0-9]*}}: error: instruction requires: NEON
// Valid rotations
vcmla.f32 d0, d1, d2, // ARM: vcmla.f32 d0, d1, d2, // THUMB: vcmla.f32 d0, d1, d2, // V82A: :[[@LINE-3]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-4]]:{{[0-9]*}}: error: instruction requires: NEON
vcmla.f32 d0, d1, d2, // ARM: vcmla.f32 d0, d1, d2, // THUMB: vcmla.f32 d0, d1, d2, // V82A: :[[@LINE-3]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-4]]:{{[0-9]*}}: error: instruction requires: NEON
vcmla.f32 d0, d1, d2, // ARM: vcmla.f32 d0, d1, d2, // THUMB: vcmla.f32 d0, d1, d2, // V82A: :[[@LINE-3]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-4]]:{{[0-9]*}}: error: instruction requires: NEON
// Invalid rotations
vcmla.f32 d0, d1, d2, // NEON-STDERR: :[[@LINE-1]]:{{[0-9]*}}: error: complex rotation must be 0, 90, 180 or 270
// NO-NEON-STDERR: :[[@LINE-2]]:{{[0-9]*}}: error: invalid instruction
vcmla.f32 d0, d1, d2, // NEON-STDERR: :[[@LINE-1]]:{{[0-9]*}}: error: complex rotation must be 0, 90, 180 or 270
// NO-NEON-STDERR: :[[@LINE-2]]:{{[0-9]*}}: error: invalid instruction
vcmla.f32 d0, d1, d2, // NEON-STDERR: :[[@LINE-1]]:{{[0-9]*}}: error: complex rotation must be 0, 90, 180 or 270
// NO-NEON-STDERR: :[[@LINE-2]]:{{[0-9]*}}: error: invalid instruction
/* ==== VCADD vector ==== */
// Valid types
vcadd.f16 d0, d1, d2, // FP16-ARM: vcadd.f16 d0, d1, d2, // FP16-THUMB: vcadd.f16 d0, d1, d2, // NO-FP16-STDERR: :[[@LINE-3]]:{{[0-9]*}}: note: instruction requires: full half-float
// V82A: :[[@LINE-4]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-5]]:{{[0-9]*}}: error: instruction requires: NEON
vcadd.f16 q0, q1, q2, // FP16-ARM: vcadd.f16 q0, q1, q2, // FP16-THUMB: vcadd.f16 q0, q1, q2, // NO-FP16-STDERR: :[[@LINE-3]]:{{[0-9]*}}: note: instruction requires: full half-float
// V82A: :[[@LINE-4]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-5]]:{{[0-9]*}}: error: instruction requires: NEON
vcadd.f32 d0, d1, d2, // ARM: vcadd.f32 d0, d1, d2, // THUMB: vcadd.f32 d0, d1, d2, // V82A: :[[@LINE-3]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-4]]:{{[0-9]*}}: error: instruction requires: NEON
vcadd.f32 q0, q1, q2, // ARM: vcadd.f32 q0, q1, q2, // THUMB: vcadd.f32 q0, q1, q2, // V82A: :[[@LINE-3]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-4]]:{{[0-9]*}}: error: instruction requires: NEON
// Valid rotations
vcadd.f32 d0, d1, d2, // ARM: vcadd.f32 d0, d1, d2, // THUMB: vcadd.f32 d0, d1, d2, // V82A: :[[@LINE-3]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-4]]:{{[0-9]*}}: error: instruction requires: NEON
// Invalid rotations
vcadd.f32 d0, d1, d2, // NEON-STDERR: :[[@LINE-1]]:{{[0-9]*}}: error: complex rotation must be 90 or 270
// NO-NEON-STDERR: :[[@LINE-2]]:{{[0-9]*}}: error: invalid instruction
vcadd.f32 d0, d1, d2, // NEON-STDERR: :[[@LINE-1]]:{{[0-9]*}}: error: complex rotation must be 90 or 270
// NO-NEON-STDERR: :[[@LINE-2]]:{{[0-9]*}}: error: invalid instruction
vcadd.f32 d0, d1, d2, // NEON-STDERR: :[[@LINE-1]]:{{[0-9]*}}: error: complex rotation must be 90 or 270
// NO-NEON-STDERR: :[[@LINE-2]]:{{[0-9]*}}: error: invalid instruction
vcadd.f32 d0, d1, d2, // NEON-STDERR: :[[@LINE-1]]:{{[0-9]*}}: error: complex rotation must be 90 or 270
// NO-NEON-STDERR: :[[@LINE-2]]:{{[0-9]*}}: error: invalid instruction
vcadd.f32 d0, d1, d2, // NEON-STDERR: :[[@LINE-1]]:{{[0-9]*}}: error: complex rotation must be 90 or 270
// NO-NEON-STDERR: :[[@LINE-2]]:{{[0-9]*}}: error: invalid instruction
/* ==== VCMLA indexed ==== */
// Valid types
vcmla.f16 d0, d1, d2[0], // FP16-ARM: vcmla.f16 d0, d1, d2[0], // FP16-THUMB: vcmla.f16 d0, d1, d2[0], // NO-FP16-STDERR: :[[@LINE-3]]:{{[0-9]*}}: note: instruction requires: full half-float
// V82A: :[[@LINE-4]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-5]]:{{[0-9]*}}: error: instruction requires: NEON
vcmla.f16 q0, q1, d2[0], // FP16-ARM: vcmla.f16 q0, q1, d2[0], // FP16-THUMB: vcmla.f16 q0, q1, d2[0], // NO-FP16-STDERR: :[[@LINE-3]]:{{[0-9]*}}: note: instruction requires: full half-float
// V82A: :[[@LINE-4]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-5]]:{{[0-9]*}}: error: instruction requires: NEON
vcmla.f32 d0, d1, d2[0], // ARM: vcmla.f32 d0, d1, d2[0], // THUMB: vcmla.f32 d0, d1, d2[0], // V82A: :[[@LINE-3]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-5]]:{{[0-9]*}}: error: instruction requires: NEON
vcmla.f32 q0, q1, d2[0], // ARM: vcmla.f32 q0, q1, d2[0], // THUMB: vcmla.f32 q0, q1, d2[0], // V82A: :[[@LINE-3]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-5]]:{{[0-9]*}}: error: instruction requires: NEON
// Valid rotations
vcmla.f32 d0, d1, d2[0], // ARM: vcmla.f32 d0, d1, d2[0], // THUMB: vcmla.f32 d0, d1, d2[0], // V82A: :[[@LINE-3]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-4]]:{{[0-9]*}}: error: instruction requires: NEON
vcmla.f32 d0, d1, d2[0], // ARM: vcmla.f32 d0, d1, d2[0], // THUMB: vcmla.f32 d0, d1, d2[0], // V82A: :[[@LINE-3]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-4]]:{{[0-9]*}}: error: instruction requires: NEON
vcmla.f32 d0, d1, d2[0], // ARM: vcmla.f32 d0, d1, d2[0], // THUMB: vcmla.f32 d0, d1, d2[0], // V82A: :[[@LINE-3]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-4]]:{{[0-9]*}}: error: instruction requires: NEON
// Invalid rotations
vcmla.f32 d0, d1, d2[0], // NEON-STDERR: :[[@LINE-1]]:{{[0-9]*}}: error: complex rotation must be 0, 90, 180 or 270
// NO-NEON-STDERR: :[[@LINE-2]]:{{[0-9]*}}: error: invalid instruction
vcmla.f32 d0, d1, d2[0], // NEON-STDERR: :[[@LINE-1]]:{{[0-9]*}}: error: complex rotation must be 0, 90, 180 or 270
// NO-NEON-STDERR: :[[@LINE-2]]:{{[0-9]*}}: error: invalid instruction
vcmla.f32 d0, d1, d2[0], // NEON-STDERR: :[[@LINE-1]]:{{[0-9]*}}: error: complex rotation must be 0, 90, 180 or 270
// NO-NEON-STDERR: :[[@LINE-2]]:{{[0-9]*}}: error: invalid instruction
// Valid indices
vcmla.f16 d0, d1, d2[1], // FP16-ARM: vcmla.f16 d0, d1, d2[1], // FP16-THUMB: vcmla.f16 d0, d1, d2[1], // V82A: :[[@LINE-3]]:{{[0-9]*}}: error: instruction requires: armv8.3a
// NO-NEON_STDERR: :[[@LINE-4]]:{{[0-9]*}}: error: instruction requires: NEON
// Invalid indices
// The text of these errors vary depending on whether fullfp16 is present.
vcmla.f16 d0, d1, d2[2], // STDERR: :[[@LINE-1]]:{{[0-9]*}}: error:
vcmla.f32 d0, d1, d2[1], // STDERR: :[[@LINE-1]]:{{[0-9]*}}: error: