remove const normalization in indexing [pr] (#14989)

rangeify can create const with device, and all is normalized in to_define_global
This commit is contained in:
chenyu
2026-02-24 15:09:11 -05:00
committed by GitHub
parent f68a472244
commit 9d9151a21e

View File

@@ -118,8 +118,6 @@ pm_apply_rangeify = PatternMatcher([
(UPat(GroupOp.All, name="x"), create_bufferize_and_index_based_on_ranges),
# remove movement op
(UPat(GroupOp.Movement, name="x"), remove_movement_op_after_rangeify),
# const/define_var shouldn't have src
(UPat((Ops.CONST, Ops.DEFINE_VAR), name="c"), lambda ctx,c: c.replace(src=()) if c in ctx.range_map else None),
])
@functools.cache