summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Module.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-04-25 17:01:32 +0000
committerCraig Topper <craig.topper@gmail.com>2017-04-25 17:01:32 +0000
commit0b650d35698d7a80352f3f4a67289b8b47df4726 (patch)
treeb456b2b1ec7a19b3de4feb063bd72c38977be156 /llvm/lib/IR/Module.cpp
parent3c0ede7f7aa201a1f4910f097682a796451d344b (diff)
downloadbcm5719-llvm-0b650d35698d7a80352f3f4a67289b8b47df4726.tar.gz
bcm5719-llvm-0b650d35698d7a80352f3f4a67289b8b47df4726.zip
[InstSimplify] Handle (~A & ~B) | (~A ^ B) -> ~A ^ B
The code Sanjay Patel moved over from InstCombine doesn't work properly if the 'and' has both inputs as nots because we used a commuted op matcher on the 'and' first. But this will bind to the first 'not' on 'and' when there could be two 'not's. InstCombine could rely on DeMorgan to ensure the 'and' wouldn't have two 'not's eventually, but InstSimplify can't rely on that. This patch matches the xor first then checks for the ands and allows a not of either operand of the xor. Differential Revision: https://reviews.llvm.org/D32458 llvm-svn: 301329
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud