We can only trust the range of the index if it is guaranteed
non-poison.
Fixes PR50949.
Differential D107364
[VectorCombine] Limit scalarization known non-poison indices. fhahn on Aug 3 2021, 9:00 AM. Authored by
Details We can only trust the range of the index if it is guaranteed Fixes PR50949.
Diff Detail
Event TimelineComment Actions I think this could use some comments (both before the check and in testcases) that freeze doesn't help. Comment Actions freeze would help, if we push it to the and and urem operands respectively I think. But I don't think there's an easy way to do this when using computeConstantRange. Not sure if there's potential for a convenient API that transforms a constant range which may include poison to one without? Otherwise I could match the and and urem patterns manually, which would allow inserting the freeze at the right place. Comment Actions Not sure how useful that would be in general, but maybe. I mean, "match the and and urem patterns manually" is basically such an API.
|
Please make sure we have a corresponding testcase with the appropriate freeze.