This is an archive of the discontinued LLVM Phabricator instance.

[ConstraintElimination] UB reproducer for D145677
ClosedPublic

Authored by vitalybuka on Mar 10 2023, 10:09 AM.

Diff Detail

Event Timeline

vitalybuka created this revision.Mar 10 2023, 10:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 10 2023, 10:09 AM
Herald added a subscriber: StephenFan. · View Herald Transcript
vitalybuka requested review of this revision.Mar 10 2023, 10:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 10 2023, 10:09 AM

It does NOT reproduce without bb01b9919fdd3d5f1b5d78dcb2aa502588618369 :(
However it should trigger UBSAN report on earlier stage of https://lab.llvm.org/buildbot/#/builders/238/builds/1810

vitalybuka added a comment.EditedMar 10 2023, 10:13 AM

It does NOT reproduce without bb01b9919fdd3d5f1b5d78dcb2aa502588618369 :(
However it should trigger UBSAN report on earlier stage of https://lab.llvm.org/buildbot/#/builders/238/builds/1810

Because it's UB we cannot assume that it will compile into a different, incorrect, executable :)

fhahn accepted this revision.Mar 10 2023, 10:17 AM

LGTM, thanks!

llvm/test/Transforms/ConstraintElimination/shl.ll
1279

Maybe just name this shl_55 or something, as this shouldn't overflow. Also might be good to replace 0 with 1 here, as uge 0 is trivially true.

This revision is now accepted and ready to land.Mar 10 2023, 10:17 AM
vitalybuka marked an inline comment as done.

use 1

This revision was landed with ongoing or failed builds.Mar 10 2023, 10:25 AM
This revision was automatically updated to reflect the committed changes.