1 # RUN: llvm-mc -triple=hexagon < %s 2>%t ; \
2 # RUN: FileCheck %s < %t --check-prefix=CHECK-STRICT
3 # RUN: llvm-mc -triple=hexagon -relax-nv-checks < %s 2>%t ; \
4 # RUN: FileCheck %s < %t --check-prefix=CHECK-RELAXED
6 # CHECK-STRICT: :12:1: error: register `R0' used with `.new' but not validly modified in the same packet
7 # CHECK-RELAXED: :12:1: error: register `R0' used with `.new' but not validly modified in the same packet
9 # invalid: r0 definition predicated on the opposite condition
10 if (p3) r0 = add(r1, r2)
11 if (!p3) memb(r20) = r0.new
14 # CHECK-STRICT: :20:1: error: register `R0' used with `.new' but not validly modified in the same packet
15 # CHECK-RELAXED: :20:1: error: register `R0' used with `.new' but not validly modified in the same packet
17 # invalid: new-value compare-and-jump cannot use floating point value
19 if (cmp.eq(r0.new, #0)) jump:nt .
22 # CHECK-STRICT: :29:1: error: register `R0' used with `.new' but not validly modified in the same packet
23 # CHECK-RELAXED: :29:1: error: register `R0' used with `.new' but not validly modified in the same packet
25 # invalid: definition of r0 should be unconditional (not explicitly docu-
28 if (cmp.eq(r0.new, #0)) jump:nt .
32 # No errors from this point on with the relaxed checks.
33 # CHECK-RELAXED-NOT: error
35 # CHECK-STRICT: :41:1: error: register `R0' used with `.new' but not validly modified in the same packet
37 # valid (relaxed): p2 and p3 cannot be proven to violate the new-value
39 if (p3) r0 = add(r1, r2)
40 if (p2) memb(r20) = r0.new
43 # CHECK-STRICT: :48:1: error: register `R0' used with `.new' but not validly modified in the same packet
45 # valid (relaxed): p3 could be always true
46 if (p3) r0 = add(r1, r2)
51 # No errors from this point on with the strict checks.
52 # CHECK-RELAXED-NOT: error
55 # valid: r0 defined unconditionally
57 if (p2) memb(r20) = r0.new
61 # valid: r0 definition and use identically predicated
62 if (p3) r0 = add(r1, r2)
63 if (p3) memb(r20) = r0.new
67 # valid: r0 defined regardless of p0
70 if (p0) memb(r20) = r0.new