This is an archive of the discontinued LLVM Phabricator instance.

Fix incorrect GEP bitwidth in areNonOverlapSameBaseLoadAndStore()
ClosedPublic

Authored by arichardson on Sep 24 2021, 4:19 AM.

Details

Summary

When using a datalayout that has pointer index width != pointer size this
code triggers an assertion in Value::stripAndAccumulateConstantOffsets().
I encountered this this while compiling FreeBSD for CHERI-RISC-V.
Also update LoadsTest.cpp to use a DataLayout with index width != pointer
width to ensure this case is tested.

Diff Detail

Event Timeline

arichardson created this revision.Sep 24 2021, 4:19 AM
arichardson requested review of this revision.Sep 24 2021, 4:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 24 2021, 4:19 AM
nikic accepted this revision.Sep 24 2021, 11:50 AM
nikic added a subscriber: nikic.

LGTM

This revision is now accepted and ready to land.Sep 24 2021, 11:50 AM
This revision was landed with ongoing or failed builds.Sep 28 2021, 9:58 AM
This revision was automatically updated to reflect the committed changes.