This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner] Stop invalid sign conversion in refineIndexType.
ClosedPublic

Authored by paulwalker-arm on Apr 7 2022, 10:35 AM.

Details

Summary

When looking through extends of gather/scatter indices it's safe
to convert a known positive signed index to unsigned, but unsigned
indices must remain unsigned.

Depends On D123318

Diff Detail

Event Timeline

paulwalker-arm created this revision.Apr 7 2022, 10:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2022, 10:35 AM
paulwalker-arm requested review of this revision.Apr 7 2022, 10:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2022, 10:35 AM
paulwalker-arm added inline comments.
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
10496

Just wanted to say that I'd rather pass an IndexType directly here but I've resisted that because I have a follow-on patch that makes ISD::IndexType easier to work with and also removes refineIndexType's MSG operand so I figured I'd keep this bug fix minimal.

paulwalker-arm added inline comments.Apr 7 2022, 5:30 PM
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
10496

D123347 is the aforementioned follow-on patch.

This revision is now accepted and ready to land.Apr 28 2022, 5:49 AM
This revision was landed with ongoing or failed builds.Apr 29 2022, 6:24 AM
This revision was automatically updated to reflect the committed changes.