This is an archive of the discontinued LLVM Phabricator instance.

[ValueTracking] Add tests for using condition in select for non-zero analysis; NFC
ClosedPublic

Authored by goldstein.w.n on Apr 9 2023, 5:15 PM.

Diff Detail

Event Timeline

goldstein.w.n created this revision.Apr 9 2023, 5:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 9 2023, 5:15 PM
goldstein.w.n requested review of this revision.Apr 9 2023, 5:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 9 2023, 5:15 PM

Add non-const tests in preperation for weakening impl

nikic added inline comments.May 22 2023, 1:54 PM
llvm/test/Analysis/ValueTracking/select-known-non-zero.ll
3

Is this file still supposed to be here? Some of the tests are redundant with those in the other file, such as the first one (select_v_ne_z), or basically anything that shows a diff in D147900.

goldstein.w.n added inline comments.May 22 2023, 2:28 PM
llvm/test/Analysis/ValueTracking/select-known-non-zero.ll
3

These are the original tests before using cmpExcludesZero (when the analysis used knownbits). Would like to add them as well as they are cases we should be able to handle. I'll drop all the tests that have diff in current D147900 or match the const test though.

Remove dup tests

nikic accepted this revision.May 23 2023, 12:33 AM

LGTM

This revision is now accepted and ready to land.May 23 2023, 12:33 AM