With multiple semantic transforms mentioning Enumerators, it may be possible for there not to be a substitution from the concrete rtl to some of the transforms. This is not an error - just a case where a given semantic transform doesnt apply. (e.g. icmp being described by different transforms with concrete intcc condition codes)
This commit is contained in:
committed by
Jakob Stoklund Olesen
parent
a2b60108fd
commit
a92021ebce
@@ -83,7 +83,12 @@ def find_matching_xform(d):
|
|||||||
|
|
||||||
for x in d.expr.inst.semantics:
|
for x in d.expr.inst.semantics:
|
||||||
subst = d.substitution(x.src.rtl[0], {})
|
subst = d.substitution(x.src.rtl[0], {})
|
||||||
assert subst is not None
|
|
||||||
|
# There may not be a substitution if there are concrete Enumerator
|
||||||
|
# values in the src pattern. (e.g. specifying the semantics of icmp.eq,
|
||||||
|
# icmp.ge... as separate transforms)
|
||||||
|
if (subst is None):
|
||||||
|
continue
|
||||||
|
|
||||||
if x.ti.permits({subst[v]: tv for (v, tv) in typing.items()}):
|
if x.ti.permits({subst[v]: tv for (v, tv) in typing.items()}):
|
||||||
res.append(x)
|
res.append(x)
|
||||||
|
|||||||
Reference in New Issue
Block a user