llvm-project/llvm/test/MC/Hexagon/multiple-pc4.s
Fangrui Song 252c42354e [test] Change llvm-mc -arch= to -triple=
The issue is uncovered by #47698: for assembly files, -triple= specifies the
full target triple while -arch= merely sets the architecture part of the default
target triple, leaving a target triple which may not make sense, e.g.
riscv64-apple-darwin.

Therefore, -arch= is error-prone and not recommended for tests. The issue has
been benign as we recognize $unknown-apple-darwin as ELF instead of rejecting it
outrightly.

Due to the nature of the issue, we don't see the issue in tests using
architectures that any of Mach-O/COFF/XCOFF supports.
2023-09-11 14:51:50 -07:00

18 lines
593 B
ArmAsm

# RUN: llvm-mc -triple=hexagon -filetype=asm %s 2>%t; FileCheck --implicit-check-not=error: %s <%t
# Check that multiple changes to a predicate in a packet are caught.
{ p0 = cmp.eq (r0, r0); p3:0 = r0 }
# CHECK: rror: register {{.+}} modified more than once
{ p0 = cmp.eq (r0, r0); c4 = r0 }
# CHECK: rror: register {{.+}} modified more than once
p3:0 = r9
# CHECK-NOT: rror: register {{.+}} modified more than once
# Multiple writes to the same predicate register are permitted:
{ p0 = cmp.eq (r0, r0); p0 = and(p1, p2) }
# CHECK-NOT: rror: register {{.+}} modified more than once