This is an archive of the discontinued LLVM Phabricator instance.

[InstSimplify] Handle commutativity for 'and' and 'outer or' for (~A & B) | ~(A | B) --> ~A
ClosedPublic

Authored by xbolva00 on Jan 16 2021, 9:32 AM.

Diff Detail

Event Timeline

xbolva00 created this revision.Jan 16 2021, 9:32 AM
xbolva00 requested review of this revision.Jan 16 2021, 9:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 16 2021, 9:32 AM

Please precommit tests.
This is more like it.

llvm/lib/Analysis/InstructionSimplify.cpp
2273–2283

Just capture it when patternmatching?

xbolva00 updated this revision to Diff 317187.Jan 16 2021, 10:12 AM

Simplify code.

llvm/lib/Analysis/InstructionSimplify.cpp
2273–2283

Oh yeah, m_CombineAnd :)

Fixed.

lebedev.ri accepted this revision.Jan 16 2021, 10:33 AM
lebedev.ri added inline comments.
llvm/lib/Analysis/InstructionSimplify.cpp
2270–2271

Please clang-format

2280

Please clang-format

This revision is now accepted and ready to land.Jan 16 2021, 10:33 AM