[llvm] r336081 - [AArch64][SVE] Asm: Support for vector element compares (immediate).

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 2 01:20:59 PDT 2018


Author: s.desmalen
Date: Mon Jul  2 01:20:59 2018
New Revision: 336081

URL: http://llvm.org/viewvc/llvm-project?rev=336081&view=rev
Log:
[AArch64][SVE] Asm: Support for vector element compares (immediate).

Compare vector elements with a signed/unsigned immediate, e.g.
  cmpgt   p0.s, p0/z, z0.s, #-16
  cmphi   p0.s, p0/z, z0.s, #127


Modified:
    llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td
    llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td
    llvm/trunk/test/MC/AArch64/SVE/cmpeq-diagnostics.s
    llvm/trunk/test/MC/AArch64/SVE/cmpeq.s
    llvm/trunk/test/MC/AArch64/SVE/cmpge-diagnostics.s
    llvm/trunk/test/MC/AArch64/SVE/cmpge.s
    llvm/trunk/test/MC/AArch64/SVE/cmpgt-diagnostics.s
    llvm/trunk/test/MC/AArch64/SVE/cmpgt.s
    llvm/trunk/test/MC/AArch64/SVE/cmphi-diagnostics.s
    llvm/trunk/test/MC/AArch64/SVE/cmphi.s
    llvm/trunk/test/MC/AArch64/SVE/cmphs-diagnostics.s
    llvm/trunk/test/MC/AArch64/SVE/cmphs.s
    llvm/trunk/test/MC/AArch64/SVE/cmple-diagnostics.s
    llvm/trunk/test/MC/AArch64/SVE/cmple.s
    llvm/trunk/test/MC/AArch64/SVE/cmplo-diagnostics.s
    llvm/trunk/test/MC/AArch64/SVE/cmplo.s
    llvm/trunk/test/MC/AArch64/SVE/cmpls-diagnostics.s
    llvm/trunk/test/MC/AArch64/SVE/cmpls.s
    llvm/trunk/test/MC/AArch64/SVE/cmplt-diagnostics.s
    llvm/trunk/test/MC/AArch64/SVE/cmplt.s
    llvm/trunk/test/MC/AArch64/SVE/cmpne-diagnostics.s
    llvm/trunk/test/MC/AArch64/SVE/cmpne.s

Modified: llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64SVEInstrInfo.td Mon Jul  2 01:20:59 2018
@@ -527,6 +527,17 @@ let Predicates = [HasSVE] in {
   defm CMPLO_WIDE_PPzZZ : sve_int_cmp_1_wide<0b110, "cmplo">;
   defm CMPLS_WIDE_PPzZZ : sve_int_cmp_1_wide<0b111, "cmpls">;
 
+  defm CMPGE_PPzZI : sve_int_scmp_vi<0b000, "cmpge">;
+  defm CMPGT_PPzZI : sve_int_scmp_vi<0b001, "cmpgt">;
+  defm CMPLT_PPzZI : sve_int_scmp_vi<0b010, "cmplt">;
+  defm CMPLE_PPzZI : sve_int_scmp_vi<0b011, "cmple">;
+  defm CMPEQ_PPzZI : sve_int_scmp_vi<0b100, "cmpeq">;
+  defm CMPNE_PPzZI : sve_int_scmp_vi<0b101, "cmpne">;
+  defm CMPHS_PPzZI : sve_int_ucmp_vi<0b00, "cmphs">;
+  defm CMPHI_PPzZI : sve_int_ucmp_vi<0b01, "cmphi">;
+  defm CMPLO_PPzZI : sve_int_ucmp_vi<0b10, "cmplo">;
+  defm CMPLS_PPzZI : sve_int_ucmp_vi<0b11, "cmpls">;
+
   defm SQINCB_XPiWdI : sve_int_pred_pattern_b_s32<0b00000, "sqincb">;
   defm UQINCB_WPiI   : sve_int_pred_pattern_b_u32<0b00001, "uqincb">;
   defm SQDECB_XPiWdI : sve_int_pred_pattern_b_s32<0b00010, "sqdecb">;

Modified: llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td (original)
+++ llvm/trunk/lib/Target/AArch64/SVEInstrFormats.td Mon Jul  2 01:20:59 2018
@@ -1051,6 +1051,80 @@ multiclass sve_int_cmp_1_wide<bits<3> op
   def _S : sve_int_cmp<0b1, 0b10, opc, asm, PPR32, ZPR32, ZPR64>;
 }
 
+
+//===----------------------------------------------------------------------===//
+// SVE Integer Compare - Signed Immediate Group
+//===----------------------------------------------------------------------===//
+
+class sve_int_scmp_vi<bits<2> sz8_64, bits<3> opc, string asm, PPRRegOp pprty,
+                      ZPRRegOp zprty,
+                      Operand immtype>
+: I<(outs pprty:$Pd), (ins PPR3bAny:$Pg, zprty:$Zn, immtype:$imm5),
+  asm, "\t$Pd, $Pg/z, $Zn, $imm5",
+  "",
+  []>, Sched<[]> {
+  bits<4> Pd;
+  bits<3> Pg;
+  bits<5> Zn;
+  bits<5> imm5;
+  let Inst{31-24} = 0b00100101;
+  let Inst{23-22} = sz8_64;
+  let Inst{21}    = 0b0;
+  let Inst{20-16} = imm5;
+  let Inst{15}    = opc{2};
+  let Inst{14}    = 0b0;
+  let Inst{13}    = opc{1};
+  let Inst{12-10} = Pg;
+  let Inst{9-5}   = Zn;
+  let Inst{4}     = opc{0};
+  let Inst{3-0}   = Pd;
+
+  let Defs = [NZCV];
+}
+
+multiclass sve_int_scmp_vi<bits<3> opc, string asm> {
+  def _B : sve_int_scmp_vi<0b00, opc, asm, PPR8, ZPR8, simm5_32b>;
+  def _H : sve_int_scmp_vi<0b01, opc, asm, PPR16, ZPR16, simm5_32b>;
+  def _S : sve_int_scmp_vi<0b10, opc, asm, PPR32, ZPR32, simm5_32b>;
+  def _D : sve_int_scmp_vi<0b11, opc, asm, PPR64, ZPR64, simm5_64b>;
+}
+
+
+//===----------------------------------------------------------------------===//
+// SVE Integer Compare - Unsigned Immediate Group
+//===----------------------------------------------------------------------===//
+
+class sve_int_ucmp_vi<bits<2> sz8_64, bits<2> opc, string asm, PPRRegOp pprty,
+                      ZPRRegOp zprty, Operand immtype>
+: I<(outs pprty:$Pd), (ins PPR3bAny:$Pg, zprty:$Zn, immtype:$imm7),
+  asm, "\t$Pd, $Pg/z, $Zn, $imm7",
+  "",
+  []>, Sched<[]> {
+  bits<4> Pd;
+  bits<3> Pg;
+  bits<5> Zn;
+  bits<7> imm7;
+  let Inst{31-24} = 0b00100100;
+  let Inst{23-22} = sz8_64;
+  let Inst{21}    = 1;
+  let Inst{20-14} = imm7;
+  let Inst{13}    = opc{1};
+  let Inst{12-10} = Pg;
+  let Inst{9-5}   = Zn;
+  let Inst{4}     = opc{0};
+  let Inst{3-0}   = Pd;
+
+  let Defs = [NZCV];
+}
+
+multiclass sve_int_ucmp_vi<bits<2> opc, string asm> {
+  def _B : sve_int_ucmp_vi<0b00, opc, asm, PPR8, ZPR8, imm0_127>;
+  def _H : sve_int_ucmp_vi<0b01, opc, asm, PPR16, ZPR16, imm0_127>;
+  def _S : sve_int_ucmp_vi<0b10, opc, asm, PPR32, ZPR32, imm0_127>;
+  def _D : sve_int_ucmp_vi<0b11, opc, asm, PPR64, ZPR64, imm0_127>;
+}
+
+
 //===----------------------------------------------------------------------===//
 //SVE Index Generation Group
 //===----------------------------------------------------------------------===//

Modified: llvm/trunk/test/MC/AArch64/SVE/cmpeq-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmpeq-diagnostics.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmpeq-diagnostics.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmpeq-diagnostics.s Mon Jul  2 01:20:59 2018
@@ -60,3 +60,17 @@ cmpeq p0.d, p0/z, z0.s, z0.s
 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
 // CHECK-NEXT: cmpeq p0.d, p0/z, z0.s, z0.s
 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Invalid immediate range
+
+cmpeq p0.s, p0/z, z0.s, #-17
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
+// CHECK-NEXT: cmpeq p0.s, p0/z, z0.s, #-17
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+cmpeq p0.s, p0/z, z0.s, #16
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
+// CHECK-NEXT: cmpeq p0.s, p0/z, z0.s, #16
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

Modified: llvm/trunk/test/MC/AArch64/SVE/cmpeq.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmpeq.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmpeq.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmpeq.s Mon Jul  2 01:20:59 2018
@@ -49,3 +49,51 @@ cmpeq   p0.s, p0/z, z0.s, z0.d
 // CHECK-ENCODING: [0x00,0x20,0x80,0x24]
 // CHECK-ERROR: instruction requires: sve
 // CHECK-UNKNOWN: 00 20 80 24 <unknown>
+
+cmpeq   p0.b, p0/z, z0.b, #-16
+// CHECK-INST: cmpeq p0.b, p0/z, z0.b, #-16
+// CHECK-ENCODING: [0x00,0x80,0x10,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 80 10 25 <unknown>
+
+cmpeq   p0.h, p0/z, z0.h, #-16
+// CHECK-INST: cmpeq p0.h, p0/z, z0.h, #-16
+// CHECK-ENCODING: [0x00,0x80,0x50,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 80 50 25 <unknown>
+
+cmpeq   p0.s, p0/z, z0.s, #-16
+// CHECK-INST: cmpeq p0.s, p0/z, z0.s, #-16
+// CHECK-ENCODING: [0x00,0x80,0x90,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 80 90 25 <unknown>
+
+cmpeq   p0.d, p0/z, z0.d, #-16
+// CHECK-INST: cmpeq p0.d, p0/z, z0.d, #-16
+// CHECK-ENCODING: [0x00,0x80,0xd0,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 80 d0 25 <unknown>
+
+cmpeq   p0.b, p0/z, z0.b, #15
+// CHECK-INST: cmpeq p0.b, p0/z, z0.b, #15
+// CHECK-ENCODING: [0x00,0x80,0x0f,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 80 0f 25 <unknown>
+
+cmpeq   p0.h, p0/z, z0.h, #15
+// CHECK-INST: cmpeq p0.h, p0/z, z0.h, #15
+// CHECK-ENCODING: [0x00,0x80,0x4f,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 80 4f 25 <unknown>
+
+cmpeq   p0.s, p0/z, z0.s, #15
+// CHECK-INST: cmpeq p0.s, p0/z, z0.s, #15
+// CHECK-ENCODING: [0x00,0x80,0x8f,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 80 8f 25 <unknown>
+
+cmpeq   p0.d, p0/z, z0.d, #15
+// CHECK-INST: cmpeq p0.d, p0/z, z0.d, #15
+// CHECK-ENCODING: [0x00,0x80,0xcf,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 80 cf 25 <unknown>

Modified: llvm/trunk/test/MC/AArch64/SVE/cmpge-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmpge-diagnostics.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmpge-diagnostics.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmpge-diagnostics.s Mon Jul  2 01:20:59 2018
@@ -60,3 +60,17 @@ cmpge p0.d, p0/z, z0.s, z0.s
 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
 // CHECK-NEXT: cmpge p0.d, p0/z, z0.s, z0.s
 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Invalid immediate range
+
+cmpge p0.s, p0/z, z0.s, #-17
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
+// CHECK-NEXT: cmpge p0.s, p0/z, z0.s, #-17
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+cmpge p0.s, p0/z, z0.s, #16
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
+// CHECK-NEXT: cmpge p0.s, p0/z, z0.s, #16
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

Modified: llvm/trunk/test/MC/AArch64/SVE/cmpge.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmpge.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmpge.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmpge.s Mon Jul  2 01:20:59 2018
@@ -48,3 +48,51 @@ cmpge   p0.s, p0/z, z0.s, z0.d
 // CHECK-ENCODING: [0x00,0x40,0x80,0x24]
 // CHECK-ERROR: instruction requires: sve
 // CHECK-UNKNOWN: 00 40 80 24 <unknown>
+
+cmpge   p0.b, p0/z, z0.b, #-16
+// CHECK-INST: cmpge p0.b, p0/z, z0.b, #-16
+// CHECK-ENCODING: [0x00,0x00,0x10,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 00 10 25 <unknown>
+
+cmpge   p0.h, p0/z, z0.h, #-16
+// CHECK-INST: cmpge p0.h, p0/z, z0.h, #-16
+// CHECK-ENCODING: [0x00,0x00,0x50,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 00 50 25 <unknown>
+
+cmpge   p0.s, p0/z, z0.s, #-16
+// CHECK-INST: cmpge p0.s, p0/z, z0.s, #-16
+// CHECK-ENCODING: [0x00,0x00,0x90,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 00 90 25 <unknown>
+
+cmpge   p0.d, p0/z, z0.d, #-16
+// CHECK-INST: cmpge p0.d, p0/z, z0.d, #-16
+// CHECK-ENCODING: [0x00,0x00,0xd0,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 00 d0 25 <unknown>
+
+cmpge   p0.b, p0/z, z0.b, #15
+// CHECK-INST: cmpge p0.b, p0/z, z0.b, #15
+// CHECK-ENCODING: [0x00,0x00,0x0f,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 00 0f 25 <unknown>
+
+cmpge   p0.h, p0/z, z0.h, #15
+// CHECK-INST: cmpge p0.h, p0/z, z0.h, #15
+// CHECK-ENCODING: [0x00,0x00,0x4f,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 00 4f 25 <unknown>
+
+cmpge   p0.s, p0/z, z0.s, #15
+// CHECK-INST: cmpge p0.s, p0/z, z0.s, #15
+// CHECK-ENCODING: [0x00,0x00,0x8f,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 00 8f 25 <unknown>
+
+cmpge   p0.d, p0/z, z0.d, #15
+// CHECK-INST: cmpge p0.d, p0/z, z0.d, #15
+// CHECK-ENCODING: [0x00,0x00,0xcf,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 00 cf 25 <unknown>

Modified: llvm/trunk/test/MC/AArch64/SVE/cmpgt-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmpgt-diagnostics.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmpgt-diagnostics.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmpgt-diagnostics.s Mon Jul  2 01:20:59 2018
@@ -60,3 +60,17 @@ cmpgt p0.d, p0/z, z0.s, z0.s
 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
 // CHECK-NEXT: cmpgt p0.d, p0/z, z0.s, z0.s
 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Invalid immediate range
+
+cmpgt p0.s, p0/z, z0.s, #-17
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
+// CHECK-NEXT: cmpgt p0.s, p0/z, z0.s, #-17
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+cmpgt p0.s, p0/z, z0.s, #16
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
+// CHECK-NEXT: cmpgt p0.s, p0/z, z0.s, #16
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

Modified: llvm/trunk/test/MC/AArch64/SVE/cmpgt.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmpgt.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmpgt.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmpgt.s Mon Jul  2 01:20:59 2018
@@ -49,3 +49,51 @@ cmpgt   p0.s, p0/z, z0.s, z0.d
 // CHECK-ENCODING: [0x10,0x40,0x80,0x24]
 // CHECK-ERROR: instruction requires: sve
 // CHECK-UNKNOWN: 10 40 80 24 <unknown>
+
+cmpgt   p0.b, p0/z, z0.b, #-16
+// CHECK-INST: cmpgt p0.b, p0/z, z0.b, #-16
+// CHECK-ENCODING: [0x10,0x00,0x10,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 00 10 25 <unknown>
+
+cmpgt   p0.h, p0/z, z0.h, #-16
+// CHECK-INST: cmpgt p0.h, p0/z, z0.h, #-16
+// CHECK-ENCODING: [0x10,0x00,0x50,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 00 50 25 <unknown>
+
+cmpgt   p0.s, p0/z, z0.s, #-16
+// CHECK-INST: cmpgt p0.s, p0/z, z0.s, #-16
+// CHECK-ENCODING: [0x10,0x00,0x90,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 00 90 25 <unknown>
+
+cmpgt   p0.d, p0/z, z0.d, #-16
+// CHECK-INST: cmpgt p0.d, p0/z, z0.d, #-16
+// CHECK-ENCODING: [0x10,0x00,0xd0,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 00 d0 25 <unknown>
+
+cmpgt   p0.b, p0/z, z0.b, #15
+// CHECK-INST: cmpgt p0.b, p0/z, z0.b, #15
+// CHECK-ENCODING: [0x10,0x00,0x0f,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 00 0f 25 <unknown>
+
+cmpgt   p0.h, p0/z, z0.h, #15
+// CHECK-INST: cmpgt p0.h, p0/z, z0.h, #15
+// CHECK-ENCODING: [0x10,0x00,0x4f,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 00 4f 25 <unknown>
+
+cmpgt   p0.s, p0/z, z0.s, #15
+// CHECK-INST: cmpgt p0.s, p0/z, z0.s, #15
+// CHECK-ENCODING: [0x10,0x00,0x8f,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 00 8f 25 <unknown>
+
+cmpgt   p0.d, p0/z, z0.d, #15
+// CHECK-INST: cmpgt p0.d, p0/z, z0.d, #15
+// CHECK-ENCODING: [0x10,0x00,0xcf,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 00 cf 25 <unknown>

Modified: llvm/trunk/test/MC/AArch64/SVE/cmphi-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmphi-diagnostics.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmphi-diagnostics.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmphi-diagnostics.s Mon Jul  2 01:20:59 2018
@@ -60,3 +60,17 @@ cmphi p0.d, p0/z, z0.s, z0.s
 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
 // CHECK-NEXT: cmphi p0.d, p0/z, z0.s, z0.s
 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Invalid immediate range
+
+cmphi p0.s, p0/z, z0.s, #-1
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 127].
+// CHECK-NEXT: cmphi p0.s, p0/z, z0.s, #-1
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+cmphi p0.s, p0/z, z0.s, #128
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 127].
+// CHECK-NEXT: cmphi p0.s, p0/z, z0.s, #128
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

Modified: llvm/trunk/test/MC/AArch64/SVE/cmphi.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmphi.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmphi.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmphi.s Mon Jul  2 01:20:59 2018
@@ -49,3 +49,51 @@ cmphi   p0.s, p0/z, z0.s, z0.d
 // CHECK-ENCODING: [0x10,0xc0,0x80,0x24]
 // CHECK-ERROR: instruction requires: sve
 // CHECK-UNKNOWN: 10 c0 80 24 <unknown>
+
+cmphi   p0.b, p0/z, z0.b, #0
+// CHECK-INST: cmphi p0.b, p0/z, z0.b, #0
+// CHECK-ENCODING: [0x10,0x00,0x20,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 00 20 24 <unknown>
+
+cmphi   p0.h, p0/z, z0.h, #0
+// CHECK-INST: cmphi p0.h, p0/z, z0.h, #0
+// CHECK-ENCODING: [0x10,0x00,0x60,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 00 60 24 <unknown>
+
+cmphi   p0.s, p0/z, z0.s, #0
+// CHECK-INST: cmphi p0.s, p0/z, z0.s, #0
+// CHECK-ENCODING: [0x10,0x00,0xa0,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 00 a0 24 <unknown>
+
+cmphi   p0.d, p0/z, z0.d, #0
+// CHECK-INST: cmphi p0.d, p0/z, z0.d, #0
+// CHECK-ENCODING: [0x10,0x00,0xe0,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 00 e0 24 <unknown>
+
+cmphi   p0.b, p0/z, z0.b, #127
+// CHECK-INST: cmphi p0.b, p0/z, z0.b, #127
+// CHECK-ENCODING: [0x10,0xc0,0x3f,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 c0 3f 24 <unknown>
+
+cmphi   p0.h, p0/z, z0.h, #127
+// CHECK-INST: cmphi p0.h, p0/z, z0.h, #127
+// CHECK-ENCODING: [0x10,0xc0,0x7f,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 c0 7f 24 <unknown>
+
+cmphi   p0.s, p0/z, z0.s, #127
+// CHECK-INST: cmphi p0.s, p0/z, z0.s, #127
+// CHECK-ENCODING: [0x10,0xc0,0xbf,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 c0 bf 24 <unknown>
+
+cmphi   p0.d, p0/z, z0.d, #127
+// CHECK-INST: cmphi p0.d, p0/z, z0.d, #127
+// CHECK-ENCODING: [0x10,0xc0,0xff,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 c0 ff 24 <unknown>

Modified: llvm/trunk/test/MC/AArch64/SVE/cmphs-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmphs-diagnostics.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmphs-diagnostics.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmphs-diagnostics.s Mon Jul  2 01:20:59 2018
@@ -61,3 +61,16 @@ cmphs p0.d, p0/z, z0.s, z0.s
 // CHECK-NEXT: cmphs p0.d, p0/z, z0.s, z0.s
 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
 
+
+// --------------------------------------------------------------------------//
+// Invalid immediate range
+
+cmphs p0.s, p0/z, z0.s, #-1
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 127].
+// CHECK-NEXT: cmphs p0.s, p0/z, z0.s, #-1
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+cmphs p0.s, p0/z, z0.s, #128
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 127].
+// CHECK-NEXT: cmphs p0.s, p0/z, z0.s, #128
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

Modified: llvm/trunk/test/MC/AArch64/SVE/cmphs.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmphs.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmphs.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmphs.s Mon Jul  2 01:20:59 2018
@@ -49,3 +49,51 @@ cmphs   p0.s, p0/z, z0.s, z0.d
 // CHECK-ENCODING: [0x00,0xc0,0x80,0x24]
 // CHECK-ERROR: instruction requires: sve
 // CHECK-UNKNOWN: 00 c0 80 24 <unknown>
+
+cmphs   p0.b, p0/z, z0.b, #0
+// CHECK-INST: cmphs p0.b, p0/z, z0.b, #0
+// CHECK-ENCODING: [0x00,0x00,0x20,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 00 20 24 <unknown>
+
+cmphs   p0.h, p0/z, z0.h, #0
+// CHECK-INST: cmphs p0.h, p0/z, z0.h, #0
+// CHECK-ENCODING: [0x00,0x00,0x60,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 00 60 24 <unknown>
+
+cmphs   p0.s, p0/z, z0.s, #0
+// CHECK-INST: cmphs p0.s, p0/z, z0.s, #0
+// CHECK-ENCODING: [0x00,0x00,0xa0,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 00 a0 24 <unknown>
+
+cmphs   p0.d, p0/z, z0.d, #0
+// CHECK-INST: cmphs p0.d, p0/z, z0.d, #0
+// CHECK-ENCODING: [0x00,0x00,0xe0,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 00 e0 24 <unknown>
+
+cmphs   p0.b, p0/z, z0.b, #127
+// CHECK-INST: cmphs p0.b, p0/z, z0.b, #127
+// CHECK-ENCODING: [0x00,0xc0,0x3f,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 c0 3f 24 <unknown>
+
+cmphs   p0.h, p0/z, z0.h, #127
+// CHECK-INST: cmphs p0.h, p0/z, z0.h, #127
+// CHECK-ENCODING: [0x00,0xc0,0x7f,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 c0 7f 24 <unknown>
+
+cmphs   p0.s, p0/z, z0.s, #127
+// CHECK-INST: cmphs p0.s, p0/z, z0.s, #127
+// CHECK-ENCODING: [0x00,0xc0,0xbf,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 c0 bf 24 <unknown>
+
+cmphs   p0.d, p0/z, z0.d, #127
+// CHECK-INST: cmphs p0.d, p0/z, z0.d, #127
+// CHECK-ENCODING: [0x00,0xc0,0xff,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 c0 ff 24 <unknown>

Modified: llvm/trunk/test/MC/AArch64/SVE/cmple-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmple-diagnostics.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmple-diagnostics.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmple-diagnostics.s Mon Jul  2 01:20:59 2018
@@ -60,3 +60,17 @@ cmple p0.d, p0/z, z0.s, z0.s
 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
 // CHECK-NEXT: cmple p0.d, p0/z, z0.s, z0.s
 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Invalid immediate range
+
+cmple p0.s, p0/z, z0.s, #-17
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
+// CHECK-NEXT: cmple p0.s, p0/z, z0.s, #-17
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+cmple p0.s, p0/z, z0.s, #16
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
+// CHECK-NEXT: cmple p0.s, p0/z, z0.s, #16
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

Modified: llvm/trunk/test/MC/AArch64/SVE/cmple.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmple.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmple.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmple.s Mon Jul  2 01:20:59 2018
@@ -48,3 +48,51 @@ cmple   p0.s, p0/z, z0.s, z0.d
 // CHECK-ENCODING: [0x10,0x60,0x80,0x24]
 // CHECK-ERROR: instruction requires: sve
 // CHECK-UNKNOWN: 10 60 80 24 <unknown>
+
+cmple   p0.b, p0/z, z0.b, #-16
+// CHECK-INST: cmple p0.b, p0/z, z0.b, #-16
+// CHECK-ENCODING: [0x10,0x20,0x10,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 20 10 25 <unknown>
+
+cmple   p0.h, p0/z, z0.h, #-16
+// CHECK-INST: cmple p0.h, p0/z, z0.h, #-16
+// CHECK-ENCODING: [0x10,0x20,0x50,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 20 50 25 <unknown>
+
+cmple   p0.s, p0/z, z0.s, #-16
+// CHECK-INST: cmple p0.s, p0/z, z0.s, #-16
+// CHECK-ENCODING: [0x10,0x20,0x90,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 20 90 25 <unknown>
+
+cmple   p0.d, p0/z, z0.d, #-16
+// CHECK-INST: cmple p0.d, p0/z, z0.d, #-16
+// CHECK-ENCODING: [0x10,0x20,0xd0,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 20 d0 25 <unknown>
+
+cmple   p0.b, p0/z, z0.b, #15
+// CHECK-INST: cmple p0.b, p0/z, z0.b, #15
+// CHECK-ENCODING: [0x10,0x20,0x0f,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 20 0f 25 <unknown>
+
+cmple   p0.h, p0/z, z0.h, #15
+// CHECK-INST: cmple p0.h, p0/z, z0.h, #15
+// CHECK-ENCODING: [0x10,0x20,0x4f,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 20 4f 25 <unknown>
+
+cmple   p0.s, p0/z, z0.s, #15
+// CHECK-INST: cmple p0.s, p0/z, z0.s, #15
+// CHECK-ENCODING: [0x10,0x20,0x8f,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 20 8f 25 <unknown>
+
+cmple   p0.d, p0/z, z0.d, #15
+// CHECK-INST: cmple p0.d, p0/z, z0.d, #15
+// CHECK-ENCODING: [0x10,0x20,0xcf,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 20 cf 25 <unknown>

Modified: llvm/trunk/test/MC/AArch64/SVE/cmplo-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmplo-diagnostics.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmplo-diagnostics.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmplo-diagnostics.s Mon Jul  2 01:20:59 2018
@@ -60,3 +60,17 @@ cmplo p0.d, p0/z, z0.s, z0.s
 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
 // CHECK-NEXT: cmplo p0.d, p0/z, z0.s, z0.s
 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Invalid immediate range
+
+cmplo p0.s, p0/z, z0.s, #-1
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 127].
+// CHECK-NEXT: cmplo p0.s, p0/z, z0.s, #-1
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+cmplo p0.s, p0/z, z0.s, #128
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 127].
+// CHECK-NEXT: cmplo p0.s, p0/z, z0.s, #128
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

Modified: llvm/trunk/test/MC/AArch64/SVE/cmplo.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmplo.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmplo.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmplo.s Mon Jul  2 01:20:59 2018
@@ -48,3 +48,51 @@ cmplo   p0.s, p0/z, z0.s, z0.d
 // CHECK-ENCODING: [0x00,0xe0,0x80,0x24]
 // CHECK-ERROR: instruction requires: sve
 // CHECK-UNKNOWN: 00 e0 80 24 <unknown>
+
+cmplo   p0.b, p0/z, z0.b, #0
+// CHECK-INST: cmplo p0.b, p0/z, z0.b, #0
+// CHECK-ENCODING: [0x00,0x20,0x20,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 20 20 24 <unknown>
+
+cmplo   p0.h, p0/z, z0.h, #0
+// CHECK-INST: cmplo p0.h, p0/z, z0.h, #0
+// CHECK-ENCODING: [0x00,0x20,0x60,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 20 60 24 <unknown>
+
+cmplo   p0.s, p0/z, z0.s, #0
+// CHECK-INST: cmplo p0.s, p0/z, z0.s, #0
+// CHECK-ENCODING: [0x00,0x20,0xa0,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 20 a0 24 <unknown>
+
+cmplo   p0.d, p0/z, z0.d, #0
+// CHECK-INST: cmplo p0.d, p0/z, z0.d, #0
+// CHECK-ENCODING: [0x00,0x20,0xe0,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 20 e0 24 <unknown>
+
+cmplo   p0.b, p0/z, z0.b, #127
+// CHECK-INST: cmplo p0.b, p0/z, z0.b, #127
+// CHECK-ENCODING: [0x00,0xe0,0x3f,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 e0 3f 24 <unknown>
+
+cmplo   p0.h, p0/z, z0.h, #127
+// CHECK-INST: cmplo p0.h, p0/z, z0.h, #127
+// CHECK-ENCODING: [0x00,0xe0,0x7f,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 e0 7f 24 <unknown>
+
+cmplo   p0.s, p0/z, z0.s, #127
+// CHECK-INST: cmplo p0.s, p0/z, z0.s, #127
+// CHECK-ENCODING: [0x00,0xe0,0xbf,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 e0 bf 24 <unknown>
+
+cmplo   p0.d, p0/z, z0.d, #127
+// CHECK-INST: cmplo p0.d, p0/z, z0.d, #127
+// CHECK-ENCODING: [0x00,0xe0,0xff,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 e0 ff 24 <unknown>

Modified: llvm/trunk/test/MC/AArch64/SVE/cmpls-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmpls-diagnostics.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmpls-diagnostics.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmpls-diagnostics.s Mon Jul  2 01:20:59 2018
@@ -60,3 +60,17 @@ cmpls p0.d, p0/z, z0.s, z0.s
 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
 // CHECK-NEXT: cmpls p0.d, p0/z, z0.s, z0.s
 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Invalid immediate range
+
+cmpls p0.s, p0/z, z0.s, #-1
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 127].
+// CHECK-NEXT: cmpls p0.s, p0/z, z0.s, #-1
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+cmpls p0.s, p0/z, z0.s, #128
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 127].
+// CHECK-NEXT: cmpls p0.s, p0/z, z0.s, #128
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

Modified: llvm/trunk/test/MC/AArch64/SVE/cmpls.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmpls.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmpls.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmpls.s Mon Jul  2 01:20:59 2018
@@ -48,3 +48,51 @@ cmpls   p0.s, p0/z, z0.s, z0.d
 // CHECK-ENCODING: [0x10,0xe0,0x80,0x24]
 // CHECK-ERROR: instruction requires: sve
 // CHECK-UNKNOWN: 10 e0 80 24 <unknown>
+
+cmpls   p0.b, p0/z, z0.b, #0
+// CHECK-INST: cmpls p0.b, p0/z, z0.b, #0
+// CHECK-ENCODING: [0x10,0x20,0x20,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 20 20 24 <unknown>
+
+cmpls   p0.h, p0/z, z0.h, #0
+// CHECK-INST: cmpls p0.h, p0/z, z0.h, #0
+// CHECK-ENCODING: [0x10,0x20,0x60,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 20 60 24 <unknown>
+
+cmpls   p0.s, p0/z, z0.s, #0
+// CHECK-INST: cmpls p0.s, p0/z, z0.s, #0
+// CHECK-ENCODING: [0x10,0x20,0xa0,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 20 a0 24 <unknown>
+
+cmpls   p0.d, p0/z, z0.d, #0
+// CHECK-INST: cmpls p0.d, p0/z, z0.d, #0
+// CHECK-ENCODING: [0x10,0x20,0xe0,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 20 e0 24 <unknown>
+
+cmpls   p0.b, p0/z, z0.b, #127
+// CHECK-INST: cmpls p0.b, p0/z, z0.b, #127
+// CHECK-ENCODING: [0x10,0xe0,0x3f,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 e0 3f 24 <unknown>
+
+cmpls   p0.h, p0/z, z0.h, #127
+// CHECK-INST: cmpls p0.h, p0/z, z0.h, #127
+// CHECK-ENCODING: [0x10,0xe0,0x7f,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 e0 7f 24 <unknown>
+
+cmpls   p0.s, p0/z, z0.s, #127
+// CHECK-INST: cmpls p0.s, p0/z, z0.s, #127
+// CHECK-ENCODING: [0x10,0xe0,0xbf,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 e0 bf 24 <unknown>
+
+cmpls   p0.d, p0/z, z0.d, #127
+// CHECK-INST: cmpls p0.d, p0/z, z0.d, #127
+// CHECK-ENCODING: [0x10,0xe0,0xff,0x24]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 e0 ff 24 <unknown>

Modified: llvm/trunk/test/MC/AArch64/SVE/cmplt-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmplt-diagnostics.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmplt-diagnostics.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmplt-diagnostics.s Mon Jul  2 01:20:59 2018
@@ -60,3 +60,17 @@ cmplt p0.d, p0/z, z0.s, z0.s
 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
 // CHECK-NEXT: cmplt p0.d, p0/z, z0.s, z0.s
 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Invalid immediate range
+
+cmplt p0.s, p0/z, z0.s, #-17
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
+// CHECK-NEXT: cmplt p0.s, p0/z, z0.s, #-17
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+cmplt p0.s, p0/z, z0.s, #16
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
+// CHECK-NEXT: cmplt p0.s, p0/z, z0.s, #16
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

Modified: llvm/trunk/test/MC/AArch64/SVE/cmplt.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmplt.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmplt.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmplt.s Mon Jul  2 01:20:59 2018
@@ -48,3 +48,51 @@ cmplt   p0.s, p0/z, z0.s, z0.d
 // CHECK-ENCODING: [0x00,0x60,0x80,0x24]
 // CHECK-ERROR: instruction requires: sve
 // CHECK-UNKNOWN: 00 60 80 24 <unknown>
+
+cmplt   p0.b, p0/z, z0.b, #-16
+// CHECK-INST: cmplt p0.b, p0/z, z0.b, #-16
+// CHECK-ENCODING: [0x00,0x20,0x10,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 20 10 25 <unknown>
+
+cmplt   p0.h, p0/z, z0.h, #-16
+// CHECK-INST: cmplt p0.h, p0/z, z0.h, #-16
+// CHECK-ENCODING: [0x00,0x20,0x50,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 20 50 25 <unknown>
+
+cmplt   p0.s, p0/z, z0.s, #-16
+// CHECK-INST: cmplt p0.s, p0/z, z0.s, #-16
+// CHECK-ENCODING: [0x00,0x20,0x90,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 20 90 25 <unknown>
+
+cmplt   p0.d, p0/z, z0.d, #-16
+// CHECK-INST: cmplt p0.d, p0/z, z0.d, #-16
+// CHECK-ENCODING: [0x00,0x20,0xd0,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 20 d0 25 <unknown>
+
+cmplt   p0.b, p0/z, z0.b, #15
+// CHECK-INST: cmplt p0.b, p0/z, z0.b, #15
+// CHECK-ENCODING: [0x00,0x20,0x0f,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 20 0f 25 <unknown>
+
+cmplt   p0.h, p0/z, z0.h, #15
+// CHECK-INST: cmplt p0.h, p0/z, z0.h, #15
+// CHECK-ENCODING: [0x00,0x20,0x4f,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 20 4f 25 <unknown>
+
+cmplt   p0.s, p0/z, z0.s, #15
+// CHECK-INST: cmplt p0.s, p0/z, z0.s, #15
+// CHECK-ENCODING: [0x00,0x20,0x8f,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 20 8f 25 <unknown>
+
+cmplt   p0.d, p0/z, z0.d, #15
+// CHECK-INST: cmplt p0.d, p0/z, z0.d, #15
+// CHECK-ENCODING: [0x00,0x20,0xcf,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 00 20 cf 25 <unknown>

Modified: llvm/trunk/test/MC/AArch64/SVE/cmpne-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmpne-diagnostics.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmpne-diagnostics.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmpne-diagnostics.s Mon Jul  2 01:20:59 2018
@@ -60,3 +60,17 @@ cmpne p0.d, p0/z, z0.s, z0.s
 // CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width
 // CHECK-NEXT: cmpne p0.d, p0/z, z0.s, z0.s
 // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+
+// --------------------------------------------------------------------------//
+// Invalid immediate range
+
+cmpne p0.s, p0/z, z0.s, #-17
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
+// CHECK-NEXT: cmpne p0.s, p0/z, z0.s, #-17
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:
+
+cmpne p0.s, p0/z, z0.s, #16
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15].
+// CHECK-NEXT: cmpne p0.s, p0/z, z0.s, #16
+// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}:

Modified: llvm/trunk/test/MC/AArch64/SVE/cmpne.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/SVE/cmpne.s?rev=336081&r1=336080&r2=336081&view=diff
==============================================================================
--- llvm/trunk/test/MC/AArch64/SVE/cmpne.s (original)
+++ llvm/trunk/test/MC/AArch64/SVE/cmpne.s Mon Jul  2 01:20:59 2018
@@ -49,3 +49,51 @@ cmpne   p0.s, p0/z, z0.s, z0.d
 // CHECK-ENCODING: [0x10,0x20,0x80,0x24]
 // CHECK-ERROR: instruction requires: sve
 // CHECK-UNKNOWN: 10 20 80 24 <unknown>
+
+cmpne   p0.b, p0/z, z0.b, #-16
+// CHECK-INST: cmpne p0.b, p0/z, z0.b, #-16
+// CHECK-ENCODING: [0x10,0x80,0x10,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 80 10 25 <unknown>
+
+cmpne   p0.h, p0/z, z0.h, #-16
+// CHECK-INST: cmpne p0.h, p0/z, z0.h, #-16
+// CHECK-ENCODING: [0x10,0x80,0x50,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 80 50 25 <unknown>
+
+cmpne   p0.s, p0/z, z0.s, #-16
+// CHECK-INST: cmpne p0.s, p0/z, z0.s, #-16
+// CHECK-ENCODING: [0x10,0x80,0x90,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 80 90 25 <unknown>
+
+cmpne   p0.d, p0/z, z0.d, #-16
+// CHECK-INST: cmpne p0.d, p0/z, z0.d, #-16
+// CHECK-ENCODING: [0x10,0x80,0xd0,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 80 d0 25 <unknown>
+
+cmpne   p0.b, p0/z, z0.b, #15
+// CHECK-INST: cmpne p0.b, p0/z, z0.b, #15
+// CHECK-ENCODING: [0x10,0x80,0x0f,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 80 0f 25 <unknown>
+
+cmpne   p0.h, p0/z, z0.h, #15
+// CHECK-INST: cmpne p0.h, p0/z, z0.h, #15
+// CHECK-ENCODING: [0x10,0x80,0x4f,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 80 4f 25 <unknown>
+
+cmpne   p0.s, p0/z, z0.s, #15
+// CHECK-INST: cmpne p0.s, p0/z, z0.s, #15
+// CHECK-ENCODING: [0x10,0x80,0x8f,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 80 8f 25 <unknown>
+
+cmpne   p0.d, p0/z, z0.d, #15
+// CHECK-INST: cmpne p0.d, p0/z, z0.d, #15
+// CHECK-ENCODING: [0x10,0x80,0xcf,0x25]
+// CHECK-ERROR: instruction requires: sve
+// CHECK-UNKNOWN: 10 80 cf 25 <unknown>




More information about the llvm-commits mailing list