[PATCH] D62942: [PATCH 2/2] [AArch64][AsmParser] error on unexpected SVE predicate type suffix

Cullen Rhodes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 6 01:34:55 PDT 2019


c-rhodes created this revision.
c-rhodes added reviewers: sdesmalen, SjoerdMeijer, rovka.
Herald added subscribers: kristof.beyls, tschuett, javed.absar.
Herald added a reviewer: rengolin.
Herald added a project: LLVM.

This patch fixes a bug in the assembler that permitted a type suffix on
predicate registers when not expected. For instance, the following was
previously valid:

  faddv h0, p0.q, z1.h

This bug was present in all SVE instructions containing predicates with
no type suffix and no predication form qualifier, i.e. /z or /m. The
latter instructions are already caught with an appropiate error message
by the assembler, e.g.:

  	    .text
      <stdin>:1:13: error: not expecting size suffix
      cmpne p1.s, p0.b/z, z2.s, 0
  		^

A similar issue for SVE vector registers was fixed in:

  https://reviews.llvm.org/D59636


Repository:
  rL LLVM

https://reviews.llvm.org/D62942

Files:
  lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
  test/MC/AArch64/SVE/andv-diagnostics.s
  test/MC/AArch64/SVE/clasta-diagnostics.s
  test/MC/AArch64/SVE/clastb-diagnostics.s
  test/MC/AArch64/SVE/cntp-diagnostics.s
  test/MC/AArch64/SVE/compact-diagnostics.s
  test/MC/AArch64/SVE/decp-diagnostics.s
  test/MC/AArch64/SVE/eorv-diagnostics.s
  test/MC/AArch64/SVE/fadda-diagnostics.s
  test/MC/AArch64/SVE/faddv-diagnostics.s
  test/MC/AArch64/SVE/fmaxnmv-diagnostics.s
  test/MC/AArch64/SVE/fmaxv-diagnostics.s
  test/MC/AArch64/SVE/fminnmv-diagnostics.s
  test/MC/AArch64/SVE/fminv-diagnostics.s
  test/MC/AArch64/SVE/incp-diagnostics.s
  test/MC/AArch64/SVE/lasta-diagnostics.s
  test/MC/AArch64/SVE/lastb-diagnostics.s
  test/MC/AArch64/SVE/orv-diagnostics.s
  test/MC/AArch64/SVE/pfirst-diagnostics.s
  test/MC/AArch64/SVE/pnext-diagnostics.s
  test/MC/AArch64/SVE/prfb-diagnostics.s
  test/MC/AArch64/SVE/prfd-diagnostics.s
  test/MC/AArch64/SVE/prfh-diagnostics.s
  test/MC/AArch64/SVE/prfw-diagnostics.s
  test/MC/AArch64/SVE/ptest-diagnostics.s
  test/MC/AArch64/SVE/saddv-diagnostics.s
  test/MC/AArch64/SVE/sel-diagnostics.s
  test/MC/AArch64/SVE/smaxv-diagnostics.s
  test/MC/AArch64/SVE/sminv-diagnostics.s
  test/MC/AArch64/SVE/splice-diagnostics.s
  test/MC/AArch64/SVE/sqdecp-diagnostics.s
  test/MC/AArch64/SVE/sqincp-diagnostics.s
  test/MC/AArch64/SVE/st1b-diagnostics.s
  test/MC/AArch64/SVE/st1d-diagnostics.s
  test/MC/AArch64/SVE/st1h-diagnostics.s
  test/MC/AArch64/SVE/st1w-diagnostics.s
  test/MC/AArch64/SVE/st2b-diagnostics.s
  test/MC/AArch64/SVE/st2d-diagnostics.s
  test/MC/AArch64/SVE/st2h-diagnostics.s
  test/MC/AArch64/SVE/st2w-diagnostics.s
  test/MC/AArch64/SVE/st3b-diagnostics.s
  test/MC/AArch64/SVE/st3d-diagnostics.s
  test/MC/AArch64/SVE/st3h-diagnostics.s
  test/MC/AArch64/SVE/st3w-diagnostics.s
  test/MC/AArch64/SVE/st4b-diagnostics.s
  test/MC/AArch64/SVE/st4d-diagnostics.s
  test/MC/AArch64/SVE/st4h-diagnostics.s
  test/MC/AArch64/SVE/st4w-diagnostics.s
  test/MC/AArch64/SVE/stnt1b-diagnostics.s
  test/MC/AArch64/SVE/stnt1d-diagnostics.s
  test/MC/AArch64/SVE/stnt1h-diagnostics.s
  test/MC/AArch64/SVE/stnt1w-diagnostics.s
  test/MC/AArch64/SVE/uaddv-diagnostics.s
  test/MC/AArch64/SVE/umaxv-diagnostics.s
  test/MC/AArch64/SVE/uminv-diagnostics.s
  test/MC/AArch64/SVE/uqdecp-diagnostics.s
  test/MC/AArch64/SVE/uqincp-diagnostics.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62942.203302.patch
Type: text/x-patch
Size: 63379 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190606/bf5f664c/attachment.bin>


More information about the llvm-commits mailing list