This is an archive of the discontinued LLVM Phabricator instance.

[LSV] Attempt to fix comparison of APInt's with different bit widths.
ClosedPublic

Authored by jlebar on May 28 2023, 10:18 PM.

Details

Summary

I have not been able to make a testcase for this, but this should be safe, and
it may fix the assertion being hit in https://reviews.llvm.org/D151630#4378572.

(We should absolutely figure out a testcase for this, either before or after
this is checked in.)

Diff Detail

Event Timeline

jlebar created this revision.May 28 2023, 10:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 28 2023, 10:18 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
jlebar requested review of this revision.May 28 2023, 10:18 PM
tschuett added inline comments.
llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
1302

Drive-by nit. .has_value()should only be in unit tests. The .has_value() is redundant in this case.

ronlieb accepted this revision.May 29 2023, 5:35 AM

I locally applied this to our downstream repos. CI passed. no issues seen on this patch.

This revision is now accepted and ready to land.May 29 2023, 5:35 AM

Thank you for checking. This morning I was able to come up with a reproducer.

jlebar added inline comments.May 29 2023, 8:44 AM
llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
1302

Didn't end up using this; removed.

This revision was automatically updated to reflect the committed changes.

@ronlieb you might want to double-check that it still works, because this patch is different than the first version. I'm pretty confident it should still work for you.

thx for fix, will re-apply patch and verify.

all good on newest patch