1 # RUN: not llvm-mc -triple=hexagon < %s 2>&1 | \
2 # RUN: FileCheck %s --check-prefix=CHECK-STRICT
3 # RUN: not llvm-mc -triple=hexagon -relax-nv-checks < %s 2>&1 | \
4 # RUN: FileCheck %s --check-prefix=CHECK-RELAXED
6 # CHECK-STRICT: :10:3: note: Register producer has the opposite predicate sense as consumer
7 # CHECK-RELAXED: :10:3: note: Register producer has the opposite predicate sense as consumer
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: :18:3: note: FPU instructions cannot be new-value producers for jumps
15 # CHECK-RELAXED: :18:3: note: FPU instructions cannot be new-value producers for jumps
16 # CHECK-RELAXED: :19:3: error: Instruction does not have a valid new register producer
17 { # invalid: new-value compare-and-jump cannot use floating point value
19 if
(cmp.eq
(r0.new
, #0)) jump:nt .
22 # No errors from this point on with the relaxed checks.
23 # CHECK-RELAXED-NOT: error
25 # CHECK-STRICT: :28:3: note: Register producer is predicated and consumer is unconditional
27 # valid in relaxed, p0 could always be true
29 if
(cmp.eq
(r0.new
, #0)) jump:nt .
32 # CHECK-STRICT: :36:3: note: Register producer does not use the same predicate register as the consumer
34 # valid (relaxed): p2 and p3 cannot be proven to violate the new-value
36 if
(p3
) r0 = add(r1, r2)
37 if
(p2
) memb
(r20) = r0.new
40 # CHECK-STRICT: :43:3: note: Register producer is predicated and consumer is unconditional
42 # valid (relaxed): p3 could be always true
43 if
(p3
) r0 = add(r1, r2)
48 # No errors from this point on with the strict checks.
49 # CHECK-RELAXED-NOT: error
52 # valid: r0 defined unconditionally
54 if
(p2
) memb
(r20) = r0.new
58 # valid: r0 definition and use identically predicated
59 if
(p3
) r0 = add(r1, r2)
60 if
(p3
) memb
(r20) = r0.new
64 # valid: r0 defined regardless of p0
67 if
(p0
) memb
(r20) = r0.new