[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / Hexagon / new-value-check.s
blob4c0674d7e2f0c7c41d5172229af0f2e593c5220c
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
18 r0 = sfadd(r1, r2)
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
28 if (p0) r0 = r1
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
35 # requirements
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)
44 memb(r20) = r0.new
48 # No errors from this point on with the strict checks.
49 # CHECK-RELAXED-NOT: error
52 # valid: r0 defined unconditionally
53 r0 = add(r1, r2)
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
65 if (p0) r0 = #0
66 if (!p0) r0 = #1
67 if (p0) memb(r20) = r0.new