aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2020-03-18 15:31:49 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2020-03-18 15:38:15 +0000
commit06150e8356c366900491b8bcb8cec8acbd15f168 (patch)
tree055a2d20d933455210e5a09dd637dd0283c88499 /llvm/lib/Analysis/ValueTracking.cpp
parent9f981e9adf9c8d29bb80306daf08d2770263ade6 (diff)
downloadllvm-06150e8356c366900491b8bcb8cec8acbd15f168.zip
llvm-06150e8356c366900491b8bcb8cec8acbd15f168.tar.gz
llvm-06150e8356c366900491b8bcb8cec8acbd15f168.tar.bz2
[ValueTracking] Add computeKnownBits DemandedElts support to AND instructions (PR36319)
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index d4f4e6e..48591c5 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -1104,8 +1104,8 @@ static void computeKnownBitsFromOperator(const Operator *I,
break;
case Instruction::And: {
// If either the LHS or the RHS are Zero, the result is zero.
- computeKnownBits(I->getOperand(1), Known, Depth + 1, Q);
- computeKnownBits(I->getOperand(0), Known2, Depth + 1, Q);
+ computeKnownBits(I->getOperand(1), DemandedElts, Known, Depth + 1, Q);
+ computeKnownBits(I->getOperand(0), DemandedElts, Known2, Depth + 1, Q);
// Output known-1 bits are only known if set in both the LHS & RHS.
Known.One &= Known2.One;