[PATCH] D32094: [InstCombine] MakeAnd/Or/Xor handling to reuse previous APInt computations

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 14 13:55:50 PDT 2017


craig.topper created this revision.

When checking if we should return a constant, we create some temporary APInts to see if we know all bits. But the exact computations we do are needed in several other locations in the same code.

This patch moves them to named temporaries so we can reuse them.

Ideally we'd write directly to KnownZero/One, but we currently seem to only write those variables after all the simplifications checks and I didn't want to change that with this patch.


https://reviews.llvm.org/D32094

Files:
  lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32094.95339.patch
Type: text/x-patch
Size: 7858 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170414/771c20bc/attachment.bin>


More information about the llvm-commits mailing list