diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-03-25 06:52:52 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-03-25 06:52:52 +0000 |
commit | 47596dd4ccd3a46c626bab21b8bdfe2901368ddc (patch) | |
tree | 133037a245c15e0b20e0009346cace6100c1eed8 /llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | |
parent | 19d8c1fed2ff39bf55bc0bf5ccd08f4be2218f73 (diff) | |
download | bcm5719-llvm-47596dd4ccd3a46c626bab21b8bdfe2901368ddc.tar.gz bcm5719-llvm-47596dd4ccd3a46c626bab21b8bdfe2901368ddc.zip |
[InstCombine] Change the interface of SimplifyDemandedBits so that it takes the instruction and operand instead of the Use.
The first thing it did was get the User for the Use to get the instruction back. This requires looking through the Uses for the User using the waymarking walk. That's pretty fast, but its probably still better to just pass the Instruction we already had.
llvm-svn: 298772
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp index d14e8291e9e..69bc38e8c76 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -3997,12 +3997,12 @@ Instruction *InstCombiner::foldICmpUsingKnownBits(ICmpInst &I) { APInt Op0KnownZero(BitWidth, 0), Op0KnownOne(BitWidth, 0); APInt Op1KnownZero(BitWidth, 0), Op1KnownOne(BitWidth, 0); - if (SimplifyDemandedBits(I.getOperandUse(0), + if (SimplifyDemandedBits(&I, 0, getDemandedBitsLHSMask(I, BitWidth, IsSignBit), Op0KnownZero, Op0KnownOne, 0)) return &I; - if (SimplifyDemandedBits(I.getOperandUse(1), APInt::getAllOnesValue(BitWidth), + if (SimplifyDemandedBits(&I, 1, APInt::getAllOnesValue(BitWidth), Op1KnownZero, Op1KnownOne, 0)) return &I; |