This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Baseline tests for folding ((A&B)^A)|((A&B)^B) to A^B
ClosedPublic

Authored by marcauberer on Sep 1 2023, 1:16 PM.

Diff Detail

Event Timeline

marcauberer created this revision.Sep 1 2023, 1:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2023, 1:16 PM
marcauberer requested review of this revision.Sep 1 2023, 1:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2023, 1:16 PM
marcauberer edited the summary of this revision. (Show Details)

Update commit message

goldstein.w.n added inline comments.
llvm/test/Transforms/InstCombine/or-xor-xor.ll
100

Can you:

  1. swap the order of the and i1 %a, %b in half the tests.
  2. make a/b binops i.e something like:
define i1 @foo(%aa, %bb, %cc) {
   %a = xor i1 %aa, %cc
   %b = xor i1 %bb, %cc
}

then swap around order of ops in the xor in some of the tests.

Also i1 is a bit of a special case. can you change tests to i8?

Address review comment

marcauberer marked an inline comment as done.Sep 2 2023, 12:43 AM
huihuiz accepted this revision.Sep 7 2023, 1:26 PM
This revision is now accepted and ready to land.Sep 7 2023, 1:26 PM