There are some exceptions to the scope rules:
parallel compare instructions
The parallel compare instruction preserves and
strengthens predicate relations when there
are several coexisting conditions.
The instruction cmp.rel.or
does not delete imply relations when the destination
register is the target of the imply relation. In the following example,
the imply relation is
generated in the first compare instruction, such that p1 implies p3
and p2 implies p3.
The instruction cmp.eq.or does not
delete these relations; p3 is the destination
register.
(p3) cmp.eq p1,p2 = r1, r2 ; p1 implies p3
cmp.eq.or p3,p4 = r5, r6
(p1) mov r4 = 2
(p3) br.cond.sptk L ; Imply still exists
mov r4 = 7 ; No write-after-write on r4
The instruction cmp.rel.and does not delete
mutex relations and imply relations when
the destination register is the source of the imply relation. The
following example shows
the instruction and parallel compare. The mutex relation is generated
in the user
annotation (p1 mutually excludes p2), and the instruction cmp.ne.and
does not delete
this relation:
.pred.rel “mutex“,p1,p2
cmp.ne.and p4,p1 = r5,r0 ; Mutex still exists
(p1) mov r4 = 2
(p2) mov r4 = 5 ; No write-after-write on r4
The instruction cmp.rel.or.andcm
p1, p2 = . . . recreates the mutex
relations between the same predicates p1
and p2, and doesn’t erase the imply relations
when p1 is the source of the imply
relation, and doesn’t erase imply relations when p2
is the target of the imply relation.
no control flow graph
IAS does not build a control flow graph (CFG);
therefore, all known relations are deleted
from the database upon any entry point to a hyperblock, whether
a label or a branch
target. However, the path across conditional branches (fallthrough)
is analyzed according
to the scope of the first instruction. In the following example,
IAS finds no dependency
violation on register r4, yet it
reports a dependency violation on register r5
because the
execution path can branch to L,
in which case IAS is unsure of the new relation between
p3 and p4:
cmp.eq p1, p2 = r1, r2
cmp.eq p3, p4 = r3, r0
(p1) mov r4 = 2
L:
(p2) mov r4 = 5
(p3) mov r5 = r7
(p4) mov r5 = r8
If you know that the predicate relation should hold even under these conditions, inform the assembler using annotation.