70 lines · plain
1# RUN: not llvm-mc -triple=hexagon < %s 2>&1 | \2# RUN: FileCheck %s --check-prefix=CHECK-STRICT3# RUN: not llvm-mc -triple=hexagon -relax-nv-checks < %s 2>&1 | \4# RUN: FileCheck %s --check-prefix=CHECK-RELAXED5 6# CHECK-STRICT: :10:3: note: Register producer has the opposite predicate sense as consumer7# CHECK-RELAXED: :10:3: note: Register producer has the opposite predicate sense as consumer8{9 # invalid: r0 definition predicated on the opposite condition10 if (p3) r0 = add(r1, r2)11 if (!p3) memb(r20) = r0.new12}13 14# CHECK-STRICT: :18:3: note: FPU instructions cannot be new-value producers for jumps15# CHECK-RELAXED: :18:3: note: FPU instructions cannot be new-value producers for jumps16# CHECK-RELAXED: :19:3: error: Instruction does not have a valid new register producer17{ # invalid: new-value compare-and-jump cannot use floating point value18 r0 = sfadd(r1, r2)19 if (cmp.eq(r0.new, #0)) jump:nt .20}21 22# No errors from this point on with the relaxed checks.23# CHECK-RELAXED-NOT: error24 25# CHECK-STRICT: :28:3: note: Register producer is predicated and consumer is unconditional26{27 # valid in relaxed, p0 could always be true28 if (p0) r0 = r129 if (cmp.eq(r0.new, #0)) jump:nt .30}31 32# CHECK-STRICT: :36:3: note: Register producer does not use the same predicate register as the consumer33{34 # valid (relaxed): p2 and p3 cannot be proven to violate the new-value35 # requirements36 if (p3) r0 = add(r1, r2)37 if (p2) memb(r20) = r0.new38}39 40# CHECK-STRICT: :43:3: note: Register producer is predicated and consumer is unconditional41{42 # valid (relaxed): p3 could be always true43 if (p3) r0 = add(r1, r2)44 memb(r20) = r0.new45}46 47 48# No errors from this point on with the strict checks.49# CHECK-RELAXED-NOT: error50 51{52 # valid: r0 defined unconditionally53 r0 = add(r1, r2)54 if (p2) memb(r20) = r0.new55}56 57{58 # valid: r0 definition and use identically predicated59 if (p3) r0 = add(r1, r2)60 if (p3) memb(r20) = r0.new61}62 63{64 # valid: r0 defined regardless of p065 if (p0) r0 = #066 if (!p0) r0 = #167 if (p0) memb(r20) = r0.new68}69 70