This is an archive of the discontinued LLVM Phabricator instance.

[test][InstCombine] Update some more test cases to use opaque pointers
ClosedPublic

Authored by bjope on Oct 3 2022, 12:12 PM.

Details

Summary

These tests cases were converted using the script at
https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34,
but there was also a need to re-run update_test_checks.py (impacting
nonnull/dereferencable attributes).

Diff Detail

Event Timeline

bjope created this revision.Oct 3 2022, 12:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 3 2022, 12:12 PM
bjope requested review of this revision.Oct 3 2022, 12:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 3 2022, 12:12 PM
nikic accepted this revision.EditedOct 3 2022, 12:29 PM

LGTM

but there was also a need to re-run update_test_checks.py (impacting nonnull/dereferencable attributes).

I looked into this, and it's quite embarrassing: isKnownNonZero() does not support bitcast and GEP constant expressions: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Analysis/ValueTracking.cpp#L2484-L2492

While the bitcast case is no longer relevant, we should probably add const expr GEP support.

This revision is now accepted and ready to land.Oct 3 2022, 12:29 PM
This revision was landed with ongoing or failed builds.Oct 3 2022, 1:18 PM
This revision was automatically updated to reflect the committed changes.