• Lei Wang's avatar
    [Refactor] Simplify index sign state handling in LegalizeNegativeIndex (#1354) · 36a2b2f3
    Lei Wang authored
    This commit refines the logic for determining the sign state of indices in the LegalizeNegativeIndex transformation. It prioritizes vector patterns, specifically Ramp and Broadcast nodes, to avoid compile-time lane queries. The handling of scalar indices is also streamlined, ensuring clearer diagnostics when non-negativity cannot be proven. These changes enhance the robustness and clarity of index handling in the transformation pass.
    36a2b2f3
legalize_negative_index.cc 7.8 KB