1*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -triple=arm64 -mattr=+neon -show-encoding < %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker// Check that the assembler can handle the documented syntax for AArch64 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Worker//------------------------------------------------------------------------------ 6*9880d681SAndroid Build Coastguard Worker// Instructions for permute 7*9880d681SAndroid Build Coastguard Worker//------------------------------------------------------------------------------ 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Worker uzp1 v0.8b, v1.8b, v2.8b 10*9880d681SAndroid Build Coastguard Worker uzp1 v0.16b, v1.16b, v2.16b 11*9880d681SAndroid Build Coastguard Worker uzp1 v0.4h, v1.4h, v2.4h 12*9880d681SAndroid Build Coastguard Worker uzp1 v0.8h, v1.8h, v2.8h 13*9880d681SAndroid Build Coastguard Worker uzp1 v0.2s, v1.2s, v2.2s 14*9880d681SAndroid Build Coastguard Worker uzp1 v0.4s, v1.4s, v2.4s 15*9880d681SAndroid Build Coastguard Worker uzp1 v0.2d, v1.2d, v2.2d 16*9880d681SAndroid Build Coastguard Worker 17*9880d681SAndroid Build Coastguard Worker// CHECK: uzp1 v0.8b, v1.8b, v2.8b // encoding: [0x20,0x18,0x02,0x0e] 18*9880d681SAndroid Build Coastguard Worker// CHECK: uzp1 v0.16b, v1.16b, v2.16b // encoding: [0x20,0x18,0x02,0x4e] 19*9880d681SAndroid Build Coastguard Worker// CHECK: uzp1 v0.4h, v1.4h, v2.4h // encoding: [0x20,0x18,0x42,0x0e] 20*9880d681SAndroid Build Coastguard Worker// CHECK: uzp1 v0.8h, v1.8h, v2.8h // encoding: [0x20,0x18,0x42,0x4e] 21*9880d681SAndroid Build Coastguard Worker// CHECK: uzp1 v0.2s, v1.2s, v2.2s // encoding: [0x20,0x18,0x82,0x0e] 22*9880d681SAndroid Build Coastguard Worker// CHECK: uzp1 v0.4s, v1.4s, v2.4s // encoding: [0x20,0x18,0x82,0x4e] 23*9880d681SAndroid Build Coastguard Worker// CHECK: uzp1 v0.2d, v1.2d, v2.2d // encoding: [0x20,0x18,0xc2,0x4e] 24*9880d681SAndroid Build Coastguard Worker 25*9880d681SAndroid Build Coastguard Worker trn1 v0.8b, v1.8b, v2.8b 26*9880d681SAndroid Build Coastguard Worker trn1 v0.16b, v1.16b, v2.16b 27*9880d681SAndroid Build Coastguard Worker trn1 v0.4h, v1.4h, v2.4h 28*9880d681SAndroid Build Coastguard Worker trn1 v0.8h, v1.8h, v2.8h 29*9880d681SAndroid Build Coastguard Worker trn1 v0.2s, v1.2s, v2.2s 30*9880d681SAndroid Build Coastguard Worker trn1 v0.4s, v1.4s, v2.4s 31*9880d681SAndroid Build Coastguard Worker trn1 v0.2d, v1.2d, v2.2d 32*9880d681SAndroid Build Coastguard Worker 33*9880d681SAndroid Build Coastguard Worker// CHECK: trn1 v0.8b, v1.8b, v2.8b // encoding: [0x20,0x28,0x02,0x0e] 34*9880d681SAndroid Build Coastguard Worker// CHECK: trn1 v0.16b, v1.16b, v2.16b // encoding: [0x20,0x28,0x02,0x4e] 35*9880d681SAndroid Build Coastguard Worker// CHECK: trn1 v0.4h, v1.4h, v2.4h // encoding: [0x20,0x28,0x42,0x0e] 36*9880d681SAndroid Build Coastguard Worker// CHECK: trn1 v0.8h, v1.8h, v2.8h // encoding: [0x20,0x28,0x42,0x4e] 37*9880d681SAndroid Build Coastguard Worker// CHECK: trn1 v0.2s, v1.2s, v2.2s // encoding: [0x20,0x28,0x82,0x0e] 38*9880d681SAndroid Build Coastguard Worker// CHECK: trn1 v0.4s, v1.4s, v2.4s // encoding: [0x20,0x28,0x82,0x4e] 39*9880d681SAndroid Build Coastguard Worker// CHECK: trn1 v0.2d, v1.2d, v2.2d // encoding: [0x20,0x28,0xc2,0x4e] 40*9880d681SAndroid Build Coastguard Worker 41*9880d681SAndroid Build Coastguard Worker zip1 v0.8b, v1.8b, v2.8b 42*9880d681SAndroid Build Coastguard Worker zip1 v0.16b, v1.16b, v2.16b 43*9880d681SAndroid Build Coastguard Worker zip1 v0.4h, v1.4h, v2.4h 44*9880d681SAndroid Build Coastguard Worker zip1 v0.8h, v1.8h, v2.8h 45*9880d681SAndroid Build Coastguard Worker zip1 v0.2s, v1.2s, v2.2s 46*9880d681SAndroid Build Coastguard Worker zip1 v0.4s, v1.4s, v2.4s 47*9880d681SAndroid Build Coastguard Worker zip1 v0.2d, v1.2d, v2.2d 48*9880d681SAndroid Build Coastguard Worker 49*9880d681SAndroid Build Coastguard Worker// CHECK: zip1 v0.8b, v1.8b, v2.8b // encoding: [0x20,0x38,0x02,0x0e] 50*9880d681SAndroid Build Coastguard Worker// CHECK: zip1 v0.16b, v1.16b, v2.16b // encoding: [0x20,0x38,0x02,0x4e] 51*9880d681SAndroid Build Coastguard Worker// CHECK: zip1 v0.4h, v1.4h, v2.4h // encoding: [0x20,0x38,0x42,0x0e] 52*9880d681SAndroid Build Coastguard Worker// CHECK: zip1 v0.8h, v1.8h, v2.8h // encoding: [0x20,0x38,0x42,0x4e] 53*9880d681SAndroid Build Coastguard Worker// CHECK: zip1 v0.2s, v1.2s, v2.2s // encoding: [0x20,0x38,0x82,0x0e] 54*9880d681SAndroid Build Coastguard Worker// CHECK: zip1 v0.4s, v1.4s, v2.4s // encoding: [0x20,0x38,0x82,0x4e] 55*9880d681SAndroid Build Coastguard Worker// CHECK: zip1 v0.2d, v1.2d, v2.2d // encoding: [0x20,0x38,0xc2,0x4e] 56*9880d681SAndroid Build Coastguard Worker 57*9880d681SAndroid Build Coastguard Worker uzp2 v0.8b, v1.8b, v2.8b 58*9880d681SAndroid Build Coastguard Worker uzp2 v0.16b, v1.16b, v2.16b 59*9880d681SAndroid Build Coastguard Worker uzp2 v0.4h, v1.4h, v2.4h 60*9880d681SAndroid Build Coastguard Worker uzp2 v0.8h, v1.8h, v2.8h 61*9880d681SAndroid Build Coastguard Worker uzp2 v0.2s, v1.2s, v2.2s 62*9880d681SAndroid Build Coastguard Worker uzp2 v0.4s, v1.4s, v2.4s 63*9880d681SAndroid Build Coastguard Worker uzp2 v0.2d, v1.2d, v2.2d 64*9880d681SAndroid Build Coastguard Worker 65*9880d681SAndroid Build Coastguard Worker// CHECK: uzp2 v0.8b, v1.8b, v2.8b // encoding: [0x20,0x58,0x02,0x0e] 66*9880d681SAndroid Build Coastguard Worker// CHECK: uzp2 v0.16b, v1.16b, v2.16b // encoding: [0x20,0x58,0x02,0x4e] 67*9880d681SAndroid Build Coastguard Worker// CHECK: uzp2 v0.4h, v1.4h, v2.4h // encoding: [0x20,0x58,0x42,0x0e] 68*9880d681SAndroid Build Coastguard Worker// CHECK: uzp2 v0.8h, v1.8h, v2.8h // encoding: [0x20,0x58,0x42,0x4e] 69*9880d681SAndroid Build Coastguard Worker// CHECK: uzp2 v0.2s, v1.2s, v2.2s // encoding: [0x20,0x58,0x82,0x0e] 70*9880d681SAndroid Build Coastguard Worker// CHECK: uzp2 v0.4s, v1.4s, v2.4s // encoding: [0x20,0x58,0x82,0x4e] 71*9880d681SAndroid Build Coastguard Worker// CHECK: uzp2 v0.2d, v1.2d, v2.2d // encoding: [0x20,0x58,0xc2,0x4e] 72*9880d681SAndroid Build Coastguard Worker 73*9880d681SAndroid Build Coastguard Worker trn2 v0.8b, v1.8b, v2.8b 74*9880d681SAndroid Build Coastguard Worker trn2 v0.16b, v1.16b, v2.16b 75*9880d681SAndroid Build Coastguard Worker trn2 v0.4h, v1.4h, v2.4h 76*9880d681SAndroid Build Coastguard Worker trn2 v0.8h, v1.8h, v2.8h 77*9880d681SAndroid Build Coastguard Worker trn2 v0.2s, v1.2s, v2.2s 78*9880d681SAndroid Build Coastguard Worker trn2 v0.4s, v1.4s, v2.4s 79*9880d681SAndroid Build Coastguard Worker trn2 v0.2d, v1.2d, v2.2d 80*9880d681SAndroid Build Coastguard Worker 81*9880d681SAndroid Build Coastguard Worker// CHECK: trn2 v0.8b, v1.8b, v2.8b // encoding: [0x20,0x68,0x02,0x0e] 82*9880d681SAndroid Build Coastguard Worker// CHECK: trn2 v0.16b, v1.16b, v2.16b // encoding: [0x20,0x68,0x02,0x4e] 83*9880d681SAndroid Build Coastguard Worker// CHECK: trn2 v0.4h, v1.4h, v2.4h // encoding: [0x20,0x68,0x42,0x0e] 84*9880d681SAndroid Build Coastguard Worker// CHECK: trn2 v0.8h, v1.8h, v2.8h // encoding: [0x20,0x68,0x42,0x4e] 85*9880d681SAndroid Build Coastguard Worker// CHECK: trn2 v0.2s, v1.2s, v2.2s // encoding: [0x20,0x68,0x82,0x0e] 86*9880d681SAndroid Build Coastguard Worker// CHECK: trn2 v0.4s, v1.4s, v2.4s // encoding: [0x20,0x68,0x82,0x4e] 87*9880d681SAndroid Build Coastguard Worker// CHECK: trn2 v0.2d, v1.2d, v2.2d // encoding: [0x20,0x68,0xc2,0x4e] 88*9880d681SAndroid Build Coastguard Worker 89*9880d681SAndroid Build Coastguard Worker zip2 v0.8b, v1.8b, v2.8b 90*9880d681SAndroid Build Coastguard Worker zip2 v0.16b, v1.16b, v2.16b 91*9880d681SAndroid Build Coastguard Worker zip2 v0.4h, v1.4h, v2.4h 92*9880d681SAndroid Build Coastguard Worker zip2 v0.8h, v1.8h, v2.8h 93*9880d681SAndroid Build Coastguard Worker zip2 v0.2s, v1.2s, v2.2s 94*9880d681SAndroid Build Coastguard Worker zip2 v0.4s, v1.4s, v2.4s 95*9880d681SAndroid Build Coastguard Worker zip2 v0.2d, v1.2d, v2.2d 96*9880d681SAndroid Build Coastguard Worker 97*9880d681SAndroid Build Coastguard Worker// CHECK: zip2 v0.8b, v1.8b, v2.8b // encoding: [0x20,0x78,0x02,0x0e] 98*9880d681SAndroid Build Coastguard Worker// CHECK: zip2 v0.16b, v1.16b, v2.16b // encoding: [0x20,0x78,0x02,0x4e] 99*9880d681SAndroid Build Coastguard Worker// CHECK: zip2 v0.4h, v1.4h, v2.4h // encoding: [0x20,0x78,0x42,0x0e] 100*9880d681SAndroid Build Coastguard Worker// CHECK: zip2 v0.8h, v1.8h, v2.8h // encoding: [0x20,0x78,0x42,0x4e] 101*9880d681SAndroid Build Coastguard Worker// CHECK: zip2 v0.2s, v1.2s, v2.2s // encoding: [0x20,0x78,0x82,0x0e] 102*9880d681SAndroid Build Coastguard Worker// CHECK: zip2 v0.4s, v1.4s, v2.4s // encoding: [0x20,0x78,0x82,0x4e] 103*9880d681SAndroid Build Coastguard Worker// CHECK: zip2 v0.2d, v1.2d, v2.2d // encoding: [0x20,0x78,0xc2,0x4e] 104