// RUN: llvm-mc -triple=aarch64-none-linux-gnu -mattr=+neon,+fullfp16 -show-encoding < %s | FileCheck %s
// Check that the assembler can handle the documented syntax for AArch64
//------------------------------------------------------------------------------
// Vector shift right by immediate
//------------------------------------------------------------------------------
sshr v0.8b, v1.8b, sshr v0.4h, v1.4h, sshr v0.2s, v1.2s, sshr v0.16b, v1.16b, sshr v0.8h, v1.8h, sshr v0.4s, v1.4s, sshr v0.2d, v1.2d, // CHECK: sshr v0.8b, v1.8b, // CHECK: sshr v0.4h, v1.4h, // CHECK: sshr v0.2s, v1.2s, // CHECK: sshr v0.16b, v1.16b, // CHECK: sshr v0.8h, v1.8h, // CHECK: sshr v0.4s, v1.4s, // CHECK: sshr v0.2d, v1.2d,
//------------------------------------------------------------------------------
// Vector shift right by immediate
//------------------------------------------------------------------------------
ushr v0.8b, v1.8b, ushr v0.4h, v1.4h, ushr v0.2s, v1.2s, ushr v0.16b, v1.16b, ushr v0.8h, v1.8h, ushr v0.4s, v1.4s, ushr v0.2d, v1.2d,
// CHECK: ushr v0.8b, v1.8b, // CHECK: ushr v0.4h, v1.4h, // CHECK: ushr v0.2s, v1.2s, // CHECK: ushr v0.16b, v1.16b, // CHECK: ushr v0.8h, v1.8h, // CHECK: ushr v0.4s, v1.4s, // CHECK: ushr v0.2d, v1.2d,
//------------------------------------------------------------------------------
// Vector shift right and accumulate by immediate
//------------------------------------------------------------------------------
ssra v0.8b, v1.8b, ssra v0.4h, v1.4h, ssra v0.2s, v1.2s, ssra v0.16b, v1.16b, ssra v0.8h, v1.8h, ssra v0.4s, v1.4s, ssra v0.2d, v1.2d,
// CHECK: ssra v0.8b, v1.8b, // CHECK: ssra v0.4h, v1.4h, // CHECK: ssra v0.2s, v1.2s, // CHECK: ssra v0.16b, v1.16b, // CHECK: ssra v0.8h, v1.8h, // CHECK: ssra v0.4s, v1.4s, // CHECK: ssra v0.2d, v1.2d,
//------------------------------------------------------------------------------
// Vector shift right and accumulate by immediate
//------------------------------------------------------------------------------
usra v0.8b, v1.8b, usra v0.4h, v1.4h, usra v0.2s, v1.2s, usra v0.16b, v1.16b, usra v0.8h, v1.8h, usra v0.4s, v1.4s, usra v0.2d, v1.2d,
// CHECK: usra v0.8b, v1.8b, // CHECK: usra v0.4h, v1.4h, // CHECK: usra v0.2s, v1.2s, // CHECK: usra v0.16b, v1.16b, // CHECK: usra v0.8h, v1.8h, // CHECK: usra v0.4s, v1.4s, // CHECK: usra v0.2d, v1.2d,
//------------------------------------------------------------------------------
// Vector rounding shift right by immediate
//------------------------------------------------------------------------------
srshr v0.8b, v1.8b, srshr v0.4h, v1.4h, srshr v0.2s, v1.2s, srshr v0.16b, v1.16b, srshr v0.8h, v1.8h, srshr v0.4s, v1.4s, srshr v0.2d, v1.2d,
// CHECK: srshr v0.8b, v1.8b, // CHECK: srshr v0.4h, v1.4h, // CHECK: srshr v0.2s, v1.2s, // CHECK: srshr v0.16b, v1.16b, // CHECK: srshr v0.8h, v1.8h, // CHECK: srshr v0.4s, v1.4s, // CHECK: srshr v0.2d, v1.2d,
//------------------------------------------------------------------------------
// Vecotr rounding shift right by immediate
//------------------------------------------------------------------------------
urshr v0.8b, v1.8b, urshr v0.4h, v1.4h, urshr v0.2s, v1.2s, urshr v0.16b, v1.16b, urshr v0.8h, v1.8h, urshr v0.4s, v1.4s, urshr v0.2d, v1.2d,
// CHECK: urshr v0.8b, v1.8b, // CHECK: urshr v0.4h, v1.4h, // CHECK: urshr v0.2s, v1.2s, // CHECK: urshr v0.16b, v1.16b, // CHECK: urshr v0.8h, v1.8h, // CHECK: urshr v0.4s, v1.4s, // CHECK: urshr v0.2d, v1.2d,
//------------------------------------------------------------------------------
// Vector rounding shift right and accumulate by immediate
//------------------------------------------------------------------------------
srsra v0.8b, v1.8b, srsra v0.4h, v1.4h, srsra v0.2s, v1.2s, srsra v0.16b, v1.16b, srsra v0.8h, v1.8h, srsra v0.4s, v1.4s, srsra v0.2d, v1.2d,
// CHECK: srsra v0.8b, v1.8b, // CHECK: srsra v0.4h, v1.4h, // CHECK: srsra v0.2s, v1.2s, // CHECK: srsra v0.16b, v1.16b, // CHECK: srsra v0.8h, v1.8h, // CHECK: srsra v0.4s, v1.4s, // CHECK: srsra v0.2d, v1.2d,
//------------------------------------------------------------------------------
// Vector rounding shift right and accumulate by immediate
//------------------------------------------------------------------------------
ursra v0.8b, v1.8b, ursra v0.4h, v1.4h, ursra v0.2s, v1.2s, ursra v0.16b, v1.16b, ursra v0.8h, v1.8h, ursra v0.4s, v1.4s, ursra v0.2d, v1.2d,
// CHECK: ursra v0.8b, v1.8b, // CHECK: ursra v0.4h, v1.4h, // CHECK: ursra v0.2s, v1.2s, // CHECK: ursra v0.16b, v1.16b, // CHECK: ursra v0.8h, v1.8h, // CHECK: ursra v0.4s, v1.4s, // CHECK: ursra v0.2d, v1.2d,
//------------------------------------------------------------------------------
// Vector shift right and insert by immediate
//------------------------------------------------------------------------------
sri v0.8b, v1.8b, sri v0.4h, v1.4h, sri v0.2s, v1.2s, sri v0.16b, v1.16b, sri v0.8h, v1.8h, sri v0.4s, v1.4s, sri v0.2d, v1.2d,
// CHECK: sri v0.8b, v1.8b, // CHECK: sri v0.4h, v1.4h, // CHECK: sri v0.2s, v1.2s, // CHECK: sri v0.16b, v1.16b, // CHECK: sri v0.8h, v1.8h, // CHECK: sri v0.4s, v1.4s,
//------------------------------------------------------------------------------
// Vector shift left and insert by immediate
//------------------------------------------------------------------------------
sli v0.8b, v1.8b, sli v0.4h, v1.4h, sli v0.2s, v1.2s, sli v0.16b, v1.16b, sli v0.8h, v1.8h, sli v0.4s, v1.4s, sli v0.2d, v1.2d,
// CHECK: sli v0.8b, v1.8b, // CHECK: sli v0.4h, v1.4h, // CHECK: sli v0.2s, v1.2s, // CHECK: sli v0.16b, v1.16b, // CHECK: sli v0.8h, v1.8h, // CHECK: sli v0.4s, v1.4s, // CHECK: sli v0.2d, v1.2d,
//------------------------------------------------------------------------------
// Vector saturating shift left unsigned by immediate
//------------------------------------------------------------------------------
sqshlu v0.8b, v1.8b, sqshlu v0.4h, v1.4h, sqshlu v0.2s, v1.2s, sqshlu v0.16b, v1.16b, sqshlu v0.8h, v1.8h, sqshlu v0.4s, v1.4s, sqshlu v0.2d, v1.2d,
// CHECK: sqshlu v0.8b, v1.8b, // CHECK: sqshlu v0.4h, v1.4h, // CHECK: sqshlu v0.2s, v1.2s, // CHECK: sqshlu v0.16b, v1.16b, // CHECK: sqshlu v0.8h, v1.8h, // CHECK: sqshlu v0.4s, v1.4s, // CHECK: sqshlu v0.2d, v1.2d,
//------------------------------------------------------------------------------
// Vector saturating shift left by immediate
//------------------------------------------------------------------------------
sqshl v0.8b, v1.8b, sqshl v0.4h, v1.4h, sqshl v0.2s, v1.2s, sqshl v0.16b, v1.16b, sqshl v0.8h, v1.8h, sqshl v0.4s, v1.4s, sqshl v0.2d, v1.2d,
// CHECK: sqshl v0.8b, v1.8b, // CHECK: sqshl v0.4h, v1.4h, // CHECK: sqshl v0.2s, v1.2s, // CHECK: sqshl v0.16b, v1.16b, // CHECK: sqshl v0.8h, v1.8h, // CHECK: sqshl v0.4s, v1.4s, // CHECK: sqshl v0.2d, v1.2d,
//------------------------------------------------------------------------------
// Vector saturating shift left by immediate
//------------------------------------------------------------------------------
uqshl v0.8b, v1.8b, uqshl v0.4h, v1.4h, uqshl v0.2s, v1.2s, uqshl v0.16b, v1.16b, uqshl v0.8h, v1.8h, uqshl v0.4s, v1.4s, uqshl v0.2d, v1.2d,
// CHECK: uqshl v0.8b, v1.8b, // CHECK: uqshl v0.4h, v1.4h, // CHECK: uqshl v0.2s, v1.2s, // CHECK: uqshl v0.16b, v1.16b, // CHECK: uqshl v0.8h, v1.8h, // CHECK: uqshl v0.4s, v1.4s, // CHECK: uqshl v0.2d, v1.2d,
//------------------------------------------------------------------------------
// Vector shift right narrow by immediate
//------------------------------------------------------------------------------
shrn v0.8b, v1.8h, shrn v0.4h, v1.4s, shrn v0.2s, v1.2d, shrn2 v0.16b, v1.8h, shrn2 v0.8h, v1.4s, shrn2 v0.4s, v1.2d,
// CHECK: shrn v0.8b, v1.8h, // CHECK: shrn v0.4h, v1.4s, // CHECK: shrn v0.2s, v1.2d, // CHECK: shrn2 v0.16b, v1.8h, // CHECK: shrn2 v0.8h, v1.4s, // CHECK: shrn2 v0.4s, v1.2d,
//------------------------------------------------------------------------------
// Vector saturating shift right unsigned narrow by immediate
//------------------------------------------------------------------------------
sqshrun v0.8b, v1.8h, sqshrun v0.4h, v1.4s, sqshrun v0.2s, v1.2d, sqshrun2 v0.16b, v1.8h, sqshrun2 v0.8h, v1.4s, sqshrun2 v0.4s, v1.2d,
// CHECK: sqshrun v0.8b, v1.8h, // CHECK: sqshrun v0.4h, v1.4s, // CHECK: sqshrun v0.2s, v1.2d, // CHECK: sqshrun2 v0.16b, v1.8h, // CHECK: sqshrun2 v0.8h, v1.4s, // CHECK: sqshrun2 v0.4s, v1.2d,
//------------------------------------------------------------------------------
// Vector rounding shift right narrow by immediate
//------------------------------------------------------------------------------
rshrn v0.8b, v1.8h, rshrn v0.4h, v1.4s, rshrn v0.2s, v1.2d, rshrn2 v0.16b, v1.8h, rshrn2 v0.8h, v1.4s, rshrn2 v0.4s, v1.2d,
// CHECK: rshrn v0.8b, v1.8h, // CHECK: rshrn v0.4h, v1.4s, // CHECK: rshrn v0.2s, v1.2d, // CHECK: rshrn2 v0.16b, v1.8h, // CHECK: rshrn2 v0.8h, v1.4s, // CHECK: rshrn2 v0.4s, v1.2d,
//------------------------------------------------------------------------------
// Vector saturating shift right rounded unsigned narrow by immediate
//------------------------------------------------------------------------------
sqrshrun v0.8b, v1.8h, sqrshrun v0.4h, v1.4s, sqrshrun v0.2s, v1.2d, sqrshrun2 v0.16b, v1.8h, sqrshrun2 v0.8h, v1.4s, sqrshrun2 v0.4s, v1.2d,
// CHECK: sqrshrun v0.8b, v1.8h, // CHECK: sqrshrun v0.4h, v1.4s, // CHECK: sqrshrun v0.2s, v1.2d, // CHECK: sqrshrun2 v0.16b, v1.8h, // CHECK: sqrshrun2 v0.8h, v1.4s, // CHECK: sqrshrun2 v0.4s, v1.2d,
//------------------------------------------------------------------------------
// Vector saturating shift right narrow by immediate
//------------------------------------------------------------------------------
sqshrn v0.8b, v1.8h, sqshrn v0.4h, v1.4s, sqshrn v0.2s, v1.2d, sqshrn2 v0.16b, v1.8h, sqshrn2 v0.8h, v1.4s, sqshrn2 v0.4s, v1.2d,
// CHECK: sqshrn v0.8b, v1.8h, // CHECK: sqshrn v0.4h, v1.4s, // CHECK: sqshrn v0.2s, v1.2d, // CHECK: sqshrn2 v0.16b, v1.8h, // CHECK: sqshrn2 v0.8h, v1.4s, // CHECK: sqshrn2 v0.4s, v1.2d,
//------------------------------------------------------------------------------
// Vector saturating shift right narrow by immediate
//------------------------------------------------------------------------------
uqshrn v0.8b, v1.8h, uqshrn v0.4h, v1.4s, uqshrn v0.2s, v1.2d, uqshrn2 v0.16b, v1.8h, uqshrn2 v0.8h, v1.4s, uqshrn2 v0.4s, v1.2d,
// CHECK: uqshrn v0.8b, v1.8h, // CHECK: uqshrn v0.4h, v1.4s, // CHECK: uqshrn v0.2s, v1.2d, // CHECK: uqshrn2 v0.16b, v1.8h, // CHECK: uqshrn2 v0.8h, v1.4s, // CHECK: uqshrn2 v0.4s, v1.2d,
//------------------------------------------------------------------------------
// Vector saturating shift right rounded narrow by immediate
//------------------------------------------------------------------------------
sqrshrn v0.8b, v1.8h, sqrshrn v0.4h, v1.4s, sqrshrn v0.2s, v1.2d, sqrshrn2 v0.16b, v1.8h, sqrshrn2 v0.8h, v1.4s, sqrshrn2 v0.4s, v1.2d,
// CHECK: sqrshrn v0.8b, v1.8h, // CHECK: sqrshrn v0.4h, v1.4s, // CHECK: sqrshrn v0.2s, v1.2d, // CHECK: sqrshrn2 v0.16b, v1.8h, // CHECK: sqrshrn2 v0.8h, v1.4s, // CHECK: sqrshrn2 v0.4s, v1.2d,
//------------------------------------------------------------------------------
// Vector saturating shift right rounded narrow by immediate
//------------------------------------------------------------------------------
uqrshrn v0.8b, v1.8h, uqrshrn v0.4h, v1.4s, uqrshrn v0.2s, v1.2d, uqrshrn2 v0.16b, v1.8h, uqrshrn2 v0.8h, v1.4s, uqrshrn2 v0.4s, v1.2d,
// CHECK: uqrshrn v0.8b, v1.8h, // CHECK: uqrshrn v0.4h, v1.4s, // CHECK: uqrshrn v0.2s, v1.2d, // CHECK: uqrshrn2 v0.16b, v1.8h, // CHECK: uqrshrn2 v0.8h, v1.4s, // CHECK: uqrshrn2 v0.4s, v1.2d,
//------------------------------------------------------------------------------
// Fixed-point convert to floating-point
//------------------------------------------------------------------------------
scvtf v0.4h, v1.4h, scvtf v0.8h, v1.8h, scvtf v0.2s, v1.2s, scvtf v0.4s, v1.4s, scvtf v0.2d, v1.2d, ucvtf v0.4h, v1.4h, ucvtf v0.8h, v1.8h, ucvtf v0.2s, v1.2s, ucvtf v0.4s, v1.4s, ucvtf v0.2d, v1.2d,
// CHECK: scvtf v0.4h, v1.4h, // CHECK: scvtf v0.8h, v1.8h, // CHECK: scvtf v0.2s, v1.2s, // CHECK: scvtf v0.4s, v1.4s, // CHECK: scvtf v0.2d, v1.2d, // CHECK: ucvtf v0.4h, v1.4h, // CHECK: ucvtf v0.8h, v1.8h, // CHECK: ucvtf v0.2s, v1.2s, // CHECK: ucvtf v0.4s, v1.4s, // CHECK: ucvtf v0.2d, v1.2d,
//------------------------------------------------------------------------------
// Floating-point convert to fixed-point
//------------------------------------------------------------------------------
fcvtzs v0.4h, v1.4h, fcvtzs v0.8h, v1.8h, fcvtzs v0.2s, v1.2s, fcvtzs v0.4s, v1.4s, fcvtzs v0.2d, v1.2d, fcvtzu v0.4h, v1.4h, fcvtzu v0.8h, v1.8h, fcvtzu v0.2s, v1.2s, fcvtzu v0.4s, v1.4s, fcvtzu v0.2d, v1.2d,
// CHECK: fcvtzs v0.4h, v1.4h, // CHECK: fcvtzs v0.8h, v1.8h, // CHECK: fcvtzs v0.2s, v1.2s, // CHECK: fcvtzs v0.4s, v1.4s, // CHECK: fcvtzs v0.2d, v1.2d, // CHECK: fcvtzu v0.4h, v1.4h, // CHECK: fcvtzu v0.8h, v1.8h, // CHECK: fcvtzu v0.2s, v1.2s, // CHECK: fcvtzu v0.4s, v1.4s, // CHECK: fcvtzu v0.2d, v1.2d,