Skip to content

Commit 491edd8

Browse files
committed
compiler: Tweak pairwise_or
1 parent e90fc9c commit 491edd8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

devito/ir/support/guards.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ def xandg(self, d, guard):
291291

292292
def pairwise_or(self, d, *guards):
293293
m = dict(self)
294+
guards = list(guards)
294295

295296
if d in m:
296297
guards.append(m[d])
@@ -490,7 +491,9 @@ def pairwise_or(*guards):
490491

491492
# Analysis
492493
for guard in guards:
493-
if guard is true or guard is None:
494+
if guard is true:
495+
return true
496+
elif guard is None:
494497
continue
495498
elif isinstance(guard, And):
496499
components = guard.args

0 commit comments

Comments
 (0)