aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/AArch64
diff options
context:
space:
mode:
authorJiangning Liu <jiangning.liu@arm.com>2013-11-06 03:35:27 +0000
committerJiangning Liu <jiangning.liu@arm.com>2013-11-06 03:35:27 +0000
commit8458f371b84ee0cd22c4a433059d53ea6e3ec4f4 (patch)
tree0a4d59f36e877036558838acfc8eb34a84ae132a /test/MC/AArch64
parent258115258f8fe15e9d74b5fb524f90b75bb917d1 (diff)
downloadexternal_llvm-8458f371b84ee0cd22c4a433059d53ea6e3ec4f4.zip
external_llvm-8458f371b84ee0cd22c4a433059d53ea6e3ec4f4.tar.gz
external_llvm-8458f371b84ee0cd22c4a433059d53ea6e3ec4f4.tar.bz2
Implement AArch64 Neon instruction set Perm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194123 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/AArch64')
-rw-r--r--test/MC/AArch64/neon-diagnostics.s416
-rw-r--r--test/MC/AArch64/neon-perm.s103
2 files changed, 519 insertions, 0 deletions
diff --git a/test/MC/AArch64/neon-diagnostics.s b/test/MC/AArch64/neon-diagnostics.s
index b549480..d9afcb1 100644
--- a/test/MC/AArch64/neon-diagnostics.s
+++ b/test/MC/AArch64/neon-diagnostics.s
@@ -5235,3 +5235,419 @@
// CHECK-ERROR: ext v0.2d, v1.2d, v2.2d, #0x0
// CHECK-ERROR: ^
+
+//----------------------------------------------------------------------
+// Permutation with 3 vectors
+//----------------------------------------------------------------------
+
+ uzp1 v0.16b, v1.8b, v2.8b
+ uzp1 v0.8b, v1.4b, v2.4b
+ uzp1 v0.8h, v1.4h, v2.4h
+ uzp1 v0.4h, v1.2h, v2.2h
+ uzp1 v0.4s, v1.2s, v2.2s
+ uzp1 v0.2s, v1.1s, v2.1s
+ uzp1 v0.2d, v1.1d, v2.1d
+ uzp1 v0.1d, v1.1d, v2.1d
+
+// CHECK-ERROR <stdin>:4289:22: error: invalid operand for instruction
+// CHECK-ERROR uzp1 v0.16b, v1.8b, v2.8b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4290:21: error: invalid operand for instruction
+// CHECK-ERROR uzp1 v0.8b, v1.4b, v2.4b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4291:21: error: invalid operand for instruction
+// CHECK-ERROR uzp1 v0.8h, v1.4h, v2.4h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4292:21: error: invalid operand for instruction
+// CHECK-ERROR uzp1 v0.4h, v1.2h, v2.2h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4293:21: error: invalid operand for instruction
+// CHECK-ERROR uzp1 v0.4s, v1.2s, v2.2s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4294:21: error: invalid operand for instruction
+// CHECK-ERROR uzp1 v0.2s, v1.1s, v2.1s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4295:21: error: invalid operand for instruction
+// CHECK-ERROR uzp1 v0.2d, v1.1d, v2.1d
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4296:17: error: invalid operand for instruction
+// CHECK-ERROR uzp1 v0.1d, v1.1d, v2.1d
+// CHECK-ERROR ^
+
+ uzp2 v0.16b, v1.8b, v2.8b
+ uzp2 v0.8b, v1.4b, v2.4b
+ uzp2 v0.8h, v1.4h, v2.4h
+ uzp2 v0.4h, v1.2h, v2.2h
+ uzp2 v0.4s, v1.2s, v2.2s
+ uzp2 v0.2s, v1.1s, v2.1s
+ uzp2 v0.2d, v1.1d, v2.1d
+ uzp2 v0.1d, v1.1d, v2.1d
+
+// CHECK-ERROR <stdin>:4298:22: error: invalid operand for instruction
+// CHECK-ERROR uzp2 v0.16b, v1.8b, v2.8b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4299:21: error: invalid operand for instruction
+// CHECK-ERROR uzp2 v0.8b, v1.4b, v2.4b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4300:21: error: invalid operand for instruction
+// CHECK-ERROR uzp2 v0.8h, v1.4h, v2.4h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4301:21: error: invalid operand for instruction
+// CHECK-ERROR uzp2 v0.4h, v1.2h, v2.2h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4302:21: error: invalid operand for instruction
+// CHECK-ERROR uzp2 v0.4s, v1.2s, v2.2s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4303:21: error: invalid operand for instruction
+// CHECK-ERROR uzp2 v0.2s, v1.1s, v2.1s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4304:21: error: invalid operand for instruction
+// CHECK-ERROR uzp2 v0.2d, v1.1d, v2.1d
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4305:17: error: invalid operand for instruction
+// CHECK-ERROR uzp2 v0.1d, v1.1d, v2.1d
+// CHECK-ERROR ^
+
+ zip1 v0.16b, v1.8b, v2.8b
+ zip1 v0.8b, v1.4b, v2.4b
+ zip1 v0.8h, v1.4h, v2.4h
+ zip1 v0.4h, v1.2h, v2.2h
+ zip1 v0.4s, v1.2s, v2.2s
+ zip1 v0.2s, v1.1s, v2.1s
+ zip1 v0.2d, v1.1d, v2.1d
+ zip1 v0.1d, v1.1d, v2.1d
+
+// CHECK-ERROR <stdin>:4307:22: error: invalid operand for instruction
+// CHECK-ERROR zip1 v0.16b, v1.8b, v2.8b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4308:21: error: invalid operand for instruction
+// CHECK-ERROR zip1 v0.8b, v1.4b, v2.4b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4309:21: error: invalid operand for instruction
+// CHECK-ERROR zip1 v0.8h, v1.4h, v2.4h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4310:21: error: invalid operand for instruction
+// CHECK-ERROR zip1 v0.4h, v1.2h, v2.2h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4311:21: error: invalid operand for instruction
+// CHECK-ERROR zip1 v0.4s, v1.2s, v2.2s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4312:21: error: invalid operand for instruction
+// CHECK-ERROR zip1 v0.2s, v1.1s, v2.1s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4313:21: error: invalid operand for instruction
+// CHECK-ERROR zip1 v0.2d, v1.1d, v2.1d
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4314:17: error: invalid operand for instruction
+// CHECK-ERROR zip1 v0.1d, v1.1d, v2.1d
+// CHECK-ERROR ^
+
+ zip2 v0.16b, v1.8b, v2.8b
+ zip2 v0.8b, v1.4b, v2.4b
+ zip2 v0.8h, v1.4h, v2.4h
+ zip2 v0.4h, v1.2h, v2.2h
+ zip2 v0.4s, v1.2s, v2.2s
+ zip2 v0.2s, v1.1s, v2.1s
+ zip2 v0.2d, v1.1d, v2.1d
+ zip2 v0.1d, v1.1d, v2.1d
+
+// CHECK-ERROR <stdin>:4316:22: error: invalid operand for instruction
+// CHECK-ERROR zip2 v0.16b, v1.8b, v2.8b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4317:21: error: invalid operand for instruction
+// CHECK-ERROR zip2 v0.8b, v1.4b, v2.4b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4318:21: error: invalid operand for instruction
+// CHECK-ERROR zip2 v0.8h, v1.4h, v2.4h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4319:21: error: invalid operand for instruction
+// CHECK-ERROR zip2 v0.4h, v1.2h, v2.2h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4320:21: error: invalid operand for instruction
+// CHECK-ERROR zip2 v0.4s, v1.2s, v2.2s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4321:21: error: invalid operand for instruction
+// CHECK-ERROR zip2 v0.2s, v1.1s, v2.1s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4322:21: error: invalid operand for instruction
+// CHECK-ERROR zip2 v0.2d, v1.1d, v2.1d
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4323:17: error: invalid operand for instruction
+// CHECK-ERROR zip2 v0.1d, v1.1d, v2.1d
+// CHECK-ERROR ^
+
+ trn1 v0.16b, v1.8b, v2.8b
+ trn1 v0.8b, v1.4b, v2.4b
+ trn1 v0.8h, v1.4h, v2.4h
+ trn1 v0.4h, v1.2h, v2.2h
+ trn1 v0.4s, v1.2s, v2.2s
+ trn1 v0.2s, v1.1s, v2.1s
+ trn1 v0.2d, v1.1d, v2.1d
+ trn1 v0.1d, v1.1d, v2.1d
+
+// CHECK-ERROR <stdin>:4325:22: error: invalid operand for instruction
+// CHECK-ERROR trn1 v0.16b, v1.8b, v2.8b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4326:21: error: invalid operand for instruction
+// CHECK-ERROR trn1 v0.8b, v1.4b, v2.4b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4327:21: error: invalid operand for instruction
+// CHECK-ERROR trn1 v0.8h, v1.4h, v2.4h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4328:21: error: invalid operand for instruction
+// CHECK-ERROR trn1 v0.4h, v1.2h, v2.2h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4329:21: error: invalid operand for instruction
+// CHECK-ERROR trn1 v0.4s, v1.2s, v2.2s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4330:21: error: invalid operand for instruction
+// CHECK-ERROR trn1 v0.2s, v1.1s, v2.1s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4331:21: error: invalid operand for instruction
+// CHECK-ERROR trn1 v0.2d, v1.1d, v2.1d
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4332:17: error: invalid operand for instruction
+// CHECK-ERROR trn1 v0.1d, v1.1d, v2.1d
+// CHECK-ERROR ^
+
+ trn2 v0.16b, v1.8b, v2.8b
+ trn2 v0.8b, v1.4b, v2.4b
+ trn2 v0.8h, v1.4h, v2.4h
+ trn2 v0.4h, v1.2h, v2.2h
+ trn2 v0.4s, v1.2s, v2.2s
+ trn2 v0.2s, v1.1s, v2.1s
+ trn2 v0.2d, v1.1d, v2.1d
+ trn2 v0.1d, v1.1d, v2.1d
+
+// CHECK-ERROR <stdin>:4334:22: error: invalid operand for instruction
+// CHECK-ERROR trn2 v0.16b, v1.8b, v2.8b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4335:21: error: invalid operand for instruction
+// CHECK-ERROR trn2 v0.8b, v1.4b, v2.4b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4336:21: error: invalid operand for instruction
+// CHECK-ERROR trn2 v0.8h, v1.4h, v2.4h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4337:21: error: invalid operand for instruction
+// CHECK-ERROR trn2 v0.4h, v1.2h, v2.2h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4338:21: error: invalid operand for instruction
+// CHECK-ERROR trn2 v0.4s, v1.2s, v2.2s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4339:21: error: invalid operand for instruction
+// CHECK-ERROR trn2 v0.2s, v1.1s, v2.1s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4340:21: error: invalid operand for instruction
+// CHECK-ERROR trn2 v0.2d, v1.1d, v2.1d
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4341:17: error: invalid operand for instruction
+// CHECK-ERROR trn2 v0.1d, v1.1d, v2.1d
+// CHECK-ERROR ^
+
+//----------------------------------------------------------------------
+// Permutation with 3 vectors
+//----------------------------------------------------------------------
+
+ uzp1 v0.16b, v1.8b, v2.8b
+ uzp1 v0.8b, v1.4b, v2.4b
+ uzp1 v0.8h, v1.4h, v2.4h
+ uzp1 v0.4h, v1.2h, v2.2h
+ uzp1 v0.4s, v1.2s, v2.2s
+ uzp1 v0.2s, v1.1s, v2.1s
+ uzp1 v0.2d, v1.1d, v2.1d
+ uzp1 v0.1d, v1.1d, v2.1d
+
+// CHECK-ERROR <stdin>:4289:22: error: invalid operand for instruction
+// CHECK-ERROR uzp1 v0.16b, v1.8b, v2.8b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4290:21: error: invalid operand for instruction
+// CHECK-ERROR uzp1 v0.8b, v1.4b, v2.4b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4291:21: error: invalid operand for instruction
+// CHECK-ERROR uzp1 v0.8h, v1.4h, v2.4h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4292:21: error: invalid operand for instruction
+// CHECK-ERROR uzp1 v0.4h, v1.2h, v2.2h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4293:21: error: invalid operand for instruction
+// CHECK-ERROR uzp1 v0.4s, v1.2s, v2.2s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4294:21: error: invalid operand for instruction
+// CHECK-ERROR uzp1 v0.2s, v1.1s, v2.1s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4295:21: error: invalid operand for instruction
+// CHECK-ERROR uzp1 v0.2d, v1.1d, v2.1d
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4296:17: error: invalid operand for instruction
+// CHECK-ERROR uzp1 v0.1d, v1.1d, v2.1d
+// CHECK-ERROR ^
+
+ uzp2 v0.16b, v1.8b, v2.8b
+ uzp2 v0.8b, v1.4b, v2.4b
+ uzp2 v0.8h, v1.4h, v2.4h
+ uzp2 v0.4h, v1.2h, v2.2h
+ uzp2 v0.4s, v1.2s, v2.2s
+ uzp2 v0.2s, v1.1s, v2.1s
+ uzp2 v0.2d, v1.1d, v2.1d
+ uzp2 v0.1d, v1.1d, v2.1d
+
+// CHECK-ERROR <stdin>:4298:22: error: invalid operand for instruction
+// CHECK-ERROR uzp2 v0.16b, v1.8b, v2.8b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4299:21: error: invalid operand for instruction
+// CHECK-ERROR uzp2 v0.8b, v1.4b, v2.4b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4300:21: error: invalid operand for instruction
+// CHECK-ERROR uzp2 v0.8h, v1.4h, v2.4h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4301:21: error: invalid operand for instruction
+// CHECK-ERROR uzp2 v0.4h, v1.2h, v2.2h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4302:21: error: invalid operand for instruction
+// CHECK-ERROR uzp2 v0.4s, v1.2s, v2.2s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4303:21: error: invalid operand for instruction
+// CHECK-ERROR uzp2 v0.2s, v1.1s, v2.1s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4304:21: error: invalid operand for instruction
+// CHECK-ERROR uzp2 v0.2d, v1.1d, v2.1d
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4305:17: error: invalid operand for instruction
+// CHECK-ERROR uzp2 v0.1d, v1.1d, v2.1d
+// CHECK-ERROR ^
+
+ zip1 v0.16b, v1.8b, v2.8b
+ zip1 v0.8b, v1.4b, v2.4b
+ zip1 v0.8h, v1.4h, v2.4h
+ zip1 v0.4h, v1.2h, v2.2h
+ zip1 v0.4s, v1.2s, v2.2s
+ zip1 v0.2s, v1.1s, v2.1s
+ zip1 v0.2d, v1.1d, v2.1d
+ zip1 v0.1d, v1.1d, v2.1d
+
+// CHECK-ERROR <stdin>:4307:22: error: invalid operand for instruction
+// CHECK-ERROR zip1 v0.16b, v1.8b, v2.8b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4308:21: error: invalid operand for instruction
+// CHECK-ERROR zip1 v0.8b, v1.4b, v2.4b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4309:21: error: invalid operand for instruction
+// CHECK-ERROR zip1 v0.8h, v1.4h, v2.4h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4310:21: error: invalid operand for instruction
+// CHECK-ERROR zip1 v0.4h, v1.2h, v2.2h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4311:21: error: invalid operand for instruction
+// CHECK-ERROR zip1 v0.4s, v1.2s, v2.2s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4312:21: error: invalid operand for instruction
+// CHECK-ERROR zip1 v0.2s, v1.1s, v2.1s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4313:21: error: invalid operand for instruction
+// CHECK-ERROR zip1 v0.2d, v1.1d, v2.1d
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4314:17: error: invalid operand for instruction
+// CHECK-ERROR zip1 v0.1d, v1.1d, v2.1d
+// CHECK-ERROR ^
+
+ zip2 v0.16b, v1.8b, v2.8b
+ zip2 v0.8b, v1.4b, v2.4b
+ zip2 v0.8h, v1.4h, v2.4h
+ zip2 v0.4h, v1.2h, v2.2h
+ zip2 v0.4s, v1.2s, v2.2s
+ zip2 v0.2s, v1.1s, v2.1s
+ zip2 v0.2d, v1.1d, v2.1d
+ zip2 v0.1d, v1.1d, v2.1d
+
+// CHECK-ERROR <stdin>:4316:22: error: invalid operand for instruction
+// CHECK-ERROR zip2 v0.16b, v1.8b, v2.8b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4317:21: error: invalid operand for instruction
+// CHECK-ERROR zip2 v0.8b, v1.4b, v2.4b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4318:21: error: invalid operand for instruction
+// CHECK-ERROR zip2 v0.8h, v1.4h, v2.4h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4319:21: error: invalid operand for instruction
+// CHECK-ERROR zip2 v0.4h, v1.2h, v2.2h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4320:21: error: invalid operand for instruction
+// CHECK-ERROR zip2 v0.4s, v1.2s, v2.2s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4321:21: error: invalid operand for instruction
+// CHECK-ERROR zip2 v0.2s, v1.1s, v2.1s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4322:21: error: invalid operand for instruction
+// CHECK-ERROR zip2 v0.2d, v1.1d, v2.1d
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4323:17: error: invalid operand for instruction
+// CHECK-ERROR zip2 v0.1d, v1.1d, v2.1d
+// CHECK-ERROR ^
+
+ trn1 v0.16b, v1.8b, v2.8b
+ trn1 v0.8b, v1.4b, v2.4b
+ trn1 v0.8h, v1.4h, v2.4h
+ trn1 v0.4h, v1.2h, v2.2h
+ trn1 v0.4s, v1.2s, v2.2s
+ trn1 v0.2s, v1.1s, v2.1s
+ trn1 v0.2d, v1.1d, v2.1d
+ trn1 v0.1d, v1.1d, v2.1d
+
+// CHECK-ERROR <stdin>:4325:22: error: invalid operand for instruction
+// CHECK-ERROR trn1 v0.16b, v1.8b, v2.8b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4326:21: error: invalid operand for instruction
+// CHECK-ERROR trn1 v0.8b, v1.4b, v2.4b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4327:21: error: invalid operand for instruction
+// CHECK-ERROR trn1 v0.8h, v1.4h, v2.4h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4328:21: error: invalid operand for instruction
+// CHECK-ERROR trn1 v0.4h, v1.2h, v2.2h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4329:21: error: invalid operand for instruction
+// CHECK-ERROR trn1 v0.4s, v1.2s, v2.2s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4330:21: error: invalid operand for instruction
+// CHECK-ERROR trn1 v0.2s, v1.1s, v2.1s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4331:21: error: invalid operand for instruction
+// CHECK-ERROR trn1 v0.2d, v1.1d, v2.1d
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4332:17: error: invalid operand for instruction
+// CHECK-ERROR trn1 v0.1d, v1.1d, v2.1d
+// CHECK-ERROR ^
+
+ trn2 v0.16b, v1.8b, v2.8b
+ trn2 v0.8b, v1.4b, v2.4b
+ trn2 v0.8h, v1.4h, v2.4h
+ trn2 v0.4h, v1.2h, v2.2h
+ trn2 v0.4s, v1.2s, v2.2s
+ trn2 v0.2s, v1.1s, v2.1s
+ trn2 v0.2d, v1.1d, v2.1d
+ trn2 v0.1d, v1.1d, v2.1d
+
+// CHECK-ERROR <stdin>:4334:22: error: invalid operand for instruction
+// CHECK-ERROR trn2 v0.16b, v1.8b, v2.8b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4335:21: error: invalid operand for instruction
+// CHECK-ERROR trn2 v0.8b, v1.4b, v2.4b
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4336:21: error: invalid operand for instruction
+// CHECK-ERROR trn2 v0.8h, v1.4h, v2.4h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4337:21: error: invalid operand for instruction
+// CHECK-ERROR trn2 v0.4h, v1.2h, v2.2h
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4338:21: error: invalid operand for instruction
+// CHECK-ERROR trn2 v0.4s, v1.2s, v2.2s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4339:21: error: invalid operand for instruction
+// CHECK-ERROR trn2 v0.2s, v1.1s, v2.1s
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4340:21: error: invalid operand for instruction
+// CHECK-ERROR trn2 v0.2d, v1.1d, v2.1d
+// CHECK-ERROR ^
+// CHECK-ERROR <stdin>:4341:17: error: invalid operand for instruction
+// CHECK-ERROR trn2 v0.1d, v1.1d, v2.1d
+// CHECK-ERROR ^
diff --git a/test/MC/AArch64/neon-perm.s b/test/MC/AArch64/neon-perm.s
new file mode 100644
index 0000000..20a4acde
--- /dev/null
+++ b/test/MC/AArch64/neon-perm.s
@@ -0,0 +1,103 @@
+// RUN: llvm-mc -triple=aarch64 -mattr=+neon -show-encoding < %s | FileCheck %s
+
+// Check that the assembler can handle the documented syntax for AArch64
+
+//------------------------------------------------------------------------------
+// Instructions for permute
+//------------------------------------------------------------------------------
+
+ uzp1 v0.8b, v1.8b, v2.8b
+ uzp1 v0.16b, v1.16b, v2.16b
+ uzp1 v0.4h, v1.4h, v2.4h
+ uzp1 v0.8h, v1.8h, v2.8h
+ uzp1 v0.2s, v1.2s, v2.2s
+ uzp1 v0.4s, v1.4s, v2.4s
+ uzp1 v0.2d, v1.2d, v2.2d
+
+// CHECK: uzp1 v0.8b, v1.8b, v2.8b // encoding: [0x20,0x18,0x02,0x0e]
+// CHECK: uzp1 v0.16b, v1.16b, v2.16b // encoding: [0x20,0x18,0x02,0x4e]
+// CHECK: uzp1 v0.4h, v1.4h, v2.4h // encoding: [0x20,0x18,0x42,0x0e]
+// CHECK: uzp1 v0.8h, v1.8h, v2.8h // encoding: [0x20,0x18,0x42,0x4e]
+// CHECK: uzp1 v0.2s, v1.2s, v2.2s // encoding: [0x20,0x18,0x82,0x0e]
+// CHECK: uzp1 v0.4s, v1.4s, v2.4s // encoding: [0x20,0x18,0x82,0x4e]
+// CHECK: uzp1 v0.2d, v1.2d, v2.2d // encoding: [0x20,0x18,0xc2,0x4e]
+
+ trn1 v0.8b, v1.8b, v2.8b
+ trn1 v0.16b, v1.16b, v2.16b
+ trn1 v0.4h, v1.4h, v2.4h
+ trn1 v0.8h, v1.8h, v2.8h
+ trn1 v0.2s, v1.2s, v2.2s
+ trn1 v0.4s, v1.4s, v2.4s
+ trn1 v0.2d, v1.2d, v2.2d
+
+// CHECK: trn1 v0.8b, v1.8b, v2.8b // encoding: [0x20,0x28,0x02,0x0e]
+// CHECK: trn1 v0.16b, v1.16b, v2.16b // encoding: [0x20,0x28,0x02,0x4e]
+// CHECK: trn1 v0.4h, v1.4h, v2.4h // encoding: [0x20,0x28,0x42,0x0e]
+// CHECK: trn1 v0.8h, v1.8h, v2.8h // encoding: [0x20,0x28,0x42,0x4e]
+// CHECK: trn1 v0.2s, v1.2s, v2.2s // encoding: [0x20,0x28,0x82,0x0e]
+// CHECK: trn1 v0.4s, v1.4s, v2.4s // encoding: [0x20,0x28,0x82,0x4e]
+// CHECK: trn1 v0.2d, v1.2d, v2.2d // encoding: [0x20,0x28,0xc2,0x4e]
+
+ zip1 v0.8b, v1.8b, v2.8b
+ zip1 v0.16b, v1.16b, v2.16b
+ zip1 v0.4h, v1.4h, v2.4h
+ zip1 v0.8h, v1.8h, v2.8h
+ zip1 v0.2s, v1.2s, v2.2s
+ zip1 v0.4s, v1.4s, v2.4s
+ zip1 v0.2d, v1.2d, v2.2d
+
+// CHECK: zip1 v0.8b, v1.8b, v2.8b // encoding: [0x20,0x38,0x02,0x0e]
+// CHECK: zip1 v0.16b, v1.16b, v2.16b // encoding: [0x20,0x38,0x02,0x4e]
+// CHECK: zip1 v0.4h, v1.4h, v2.4h // encoding: [0x20,0x38,0x42,0x0e]
+// CHECK: zip1 v0.8h, v1.8h, v2.8h // encoding: [0x20,0x38,0x42,0x4e]
+// CHECK: zip1 v0.2s, v1.2s, v2.2s // encoding: [0x20,0x38,0x82,0x0e]
+// CHECK: zip1 v0.4s, v1.4s, v2.4s // encoding: [0x20,0x38,0x82,0x4e]
+// CHECK: zip1 v0.2d, v1.2d, v2.2d // encoding: [0x20,0x38,0xc2,0x4e]
+
+ uzp2 v0.8b, v1.8b, v2.8b
+ uzp2 v0.16b, v1.16b, v2.16b
+ uzp2 v0.4h, v1.4h, v2.4h
+ uzp2 v0.8h, v1.8h, v2.8h
+ uzp2 v0.2s, v1.2s, v2.2s
+ uzp2 v0.4s, v1.4s, v2.4s
+ uzp2 v0.2d, v1.2d, v2.2d
+
+// CHECK: uzp2 v0.8b, v1.8b, v2.8b // encoding: [0x20,0x58,0x02,0x0e]
+// CHECK: uzp2 v0.16b, v1.16b, v2.16b // encoding: [0x20,0x58,0x02,0x4e]
+// CHECK: uzp2 v0.4h, v1.4h, v2.4h // encoding: [0x20,0x58,0x42,0x0e]
+// CHECK: uzp2 v0.8h, v1.8h, v2.8h // encoding: [0x20,0x58,0x42,0x4e]
+// CHECK: uzp2 v0.2s, v1.2s, v2.2s // encoding: [0x20,0x58,0x82,0x0e]
+// CHECK: uzp2 v0.4s, v1.4s, v2.4s // encoding: [0x20,0x58,0x82,0x4e]
+// CHECK: uzp2 v0.2d, v1.2d, v2.2d // encoding: [0x20,0x58,0xc2,0x4e]
+
+ trn2 v0.8b, v1.8b, v2.8b
+ trn2 v0.16b, v1.16b, v2.16b
+ trn2 v0.4h, v1.4h, v2.4h
+ trn2 v0.8h, v1.8h, v2.8h
+ trn2 v0.2s, v1.2s, v2.2s
+ trn2 v0.4s, v1.4s, v2.4s
+ trn2 v0.2d, v1.2d, v2.2d
+
+// CHECK: trn2 v0.8b, v1.8b, v2.8b // encoding: [0x20,0x68,0x02,0x0e]
+// CHECK: trn2 v0.16b, v1.16b, v2.16b // encoding: [0x20,0x68,0x02,0x4e]
+// CHECK: trn2 v0.4h, v1.4h, v2.4h // encoding: [0x20,0x68,0x42,0x0e]
+// CHECK: trn2 v0.8h, v1.8h, v2.8h // encoding: [0x20,0x68,0x42,0x4e]
+// CHECK: trn2 v0.2s, v1.2s, v2.2s // encoding: [0x20,0x68,0x82,0x0e]
+// CHECK: trn2 v0.4s, v1.4s, v2.4s // encoding: [0x20,0x68,0x82,0x4e]
+// CHECK: trn2 v0.2d, v1.2d, v2.2d // encoding: [0x20,0x68,0xc2,0x4e]
+
+ zip2 v0.8b, v1.8b, v2.8b
+ zip2 v0.16b, v1.16b, v2.16b
+ zip2 v0.4h, v1.4h, v2.4h
+ zip2 v0.8h, v1.8h, v2.8h
+ zip2 v0.2s, v1.2s, v2.2s
+ zip2 v0.4s, v1.4s, v2.4s
+ zip2 v0.2d, v1.2d, v2.2d
+
+// CHECK: zip2 v0.8b, v1.8b, v2.8b // encoding: [0x20,0x78,0x02,0x0e]
+// CHECK: zip2 v0.16b, v1.16b, v2.16b // encoding: [0x20,0x78,0x02,0x4e]
+// CHECK: zip2 v0.4h, v1.4h, v2.4h // encoding: [0x20,0x78,0x42,0x0e]
+// CHECK: zip2 v0.8h, v1.8h, v2.8h // encoding: [0x20,0x78,0x42,0x4e]
+// CHECK: zip2 v0.2s, v1.2s, v2.2s // encoding: [0x20,0x78,0x82,0x0e]
+// CHECK: zip2 v0.4s, v1.4s, v2.4s // encoding: [0x20,0x78,0x82,0x4e]
+// CHECK: zip2 v0.2d, v1.2d, v2.2d // encoding: [0x20,0x78,0xc2,0x4e]