This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add additional tests for folding `(select (setgt X, -1), C, C+1)`; NFC
AcceptedPublic

Authored by goldstein.w.n on Feb 28 2023, 1:20 PM.

Details

Reviewers
RKSimon
pengfei
Summary

The goal of these tests is to hit more cases where typeof(X) != typeof(C).

Diff Detail

Event Timeline

goldstein.w.n created this revision.Feb 28 2023, 1:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2023, 1:20 PM
Herald added a subscriber: pengfei. · View Herald Transcript
goldstein.w.n requested review of this revision.Feb 28 2023, 1:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2023, 1:20 PM

i64 test cases (both a compare and select) would be useful to see what happens on 32-bit builds

i64 test cases (both a compare and select) would be useful to see what happens on 32-bit builds

We already have an i64 test in the file (the original test case that prompted this patch).
See: selecti64i32

Add tests for sext + add case, add comment explaining missing i64 case

i64 test cases (both a compare and select) would be useful to see what happens on 32-bit builds

We already have an i64 test in the file (the original test case that prompted this patch).
See: selecti64i32

Added comment this affect.

RKSimon accepted this revision.Mar 3 2023, 3:05 AM

LGTM - cheers

llvm/test/CodeGen/X86/select-constant-xor.ll
47

found it!

68

found it!

258

Cheers - instead of temporarily altering your patch like this you can just add a comment in phab to any line in the file

This revision is now accepted and ready to land.Mar 3 2023, 3:05 AM