[llvm] e346ea9 - [InstCombine] SimplifyDemandedUseBits - pass APInt by const reference. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 20 04:16:20 PDT 2020
Author: Simon Pilgrim
Date: 2020-10-20T12:13:08+01:00
New Revision: e346ea990528d93758ed216c53b2ef86ea82ff72
URL: https://github.com/llvm/llvm-project/commit/e346ea990528d93758ed216c53b2ef86ea82ff72
DIFF: https://github.com/llvm/llvm-project/commit/e346ea990528d93758ed216c53b2ef86ea82ff72.diff
LOG: [InstCombine] SimplifyDemandedUseBits - pass APInt by const reference. NFCI.
Added:
Modified:
llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
index 1b8519b0d62b..805eab0df13d 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
@@ -339,7 +339,7 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
// we can. This helps not break apart (or helps put back together)
// canonical patterns like min and max.
auto CanonicalizeSelectConstant = [](Instruction *I, unsigned OpNo,
- APInt DemandedMask) {
+ const APInt &DemandedMask) {
const APInt *SelC;
if (!match(I->getOperand(OpNo), m_APInt(SelC)))
return false;
More information about the llvm-commits
mailing list