This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Add tests that patterns for knownbits of and/or/xor apply in `SimplifyDemandedUseBits`; NFC
AbandonedPublic

Authored by goldstein.w.n on Jan 23 2023, 5:39 PM.

Details

Reviewers
nikic
majnemer

Diff Detail

Event Timeline

goldstein.w.n created this revision.Jan 23 2023, 5:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 23 2023, 5:39 PM
Herald added a subscriber: foad. · View Herald Transcript
goldstein.w.n requested review of this revision.Jan 23 2023, 5:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 23 2023, 5:39 PM

Remove 1/3 of tests

nikic added a comment.Feb 22 2023, 2:13 PM

Hm, do we actually need these tests? It looks like the ValueTracking/knownbits-and-or-xor-lowbit.ll tests already demonstrate that the low bit patterns fold via demanded bits, and ValueTracking/knownbits-bmi-pattern.ll that the bmi patterns do as well, which covers all the relevant special cases, right?

Hm, do we actually need these tests? It looks like the ValueTracking/knownbits-and-or-xor-lowbit.ll tests already demonstrate that the low bit patterns fold via demanded bits, and ValueTracking/knownbits-bmi-pattern.ll that the bmi patterns do as well, which covers all the relevant special cases, right?

I think for the most part they are redundant (given the other files). LMK if you want me to drop (added mostly b.c policy is tests come with any patch).

Hm, do we actually need these tests? It looks like the ValueTracking/knownbits-and-or-xor-lowbit.ll tests already demonstrate that the low bit patterns fold via demanded bits, and ValueTracking/knownbits-bmi-pattern.ll that the bmi patterns do as well, which covers all the relevant special cases, right?

I think for the most part they are redundant (given the other files). LMK if you want me to drop (added mostly b.c policy is tests come with any patch).

I think it's fine to drop -- we do still have test coverage from previous test additions, so that's okay.

goldstein.w.n abandoned this revision.Feb 23 2023, 11:49 AM

Hm, do we actually need these tests? It looks like the ValueTracking/knownbits-and-or-xor-lowbit.ll tests already demonstrate that the low bit patterns fold via demanded bits, and ValueTracking/knownbits-bmi-pattern.ll that the bmi patterns do as well, which covers all the relevant special cases, right?

I think for the most part they are redundant (given the other files). LMK if you want me to drop (added mostly b.c policy is tests come with any patch).

I think it's fine to drop -- we do still have test coverage from previous test additions, so that's okay.

Okay.