Skip to content

Commit

Permalink
slice IRMatcher should only match on slices
Browse files Browse the repository at this point in the history
Fixes #7768
  • Loading branch information
abadams committed Aug 17, 2023
1 parent df4c981 commit 21fa8b5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/IRMatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -2101,6 +2101,7 @@ struct SliceOp {
}
const Shuffle &v = (const Shuffle &)e;
return v.vectors.size() == 1 &&
v.is_slice() &&
vec.template match<bound>(*v.vectors[0].get(), state) &&
base.template match<bound | bindings<Vec>::mask>(v.slice_begin(), state) &&
stride.template match<bound | bindings<Vec>::mask | bindings<Base>::mask>(v.slice_stride(), state) &&
Expand Down

0 comments on commit 21fa8b5

Please sign in to comment.