Skip to content

Commit f8140fd

Browse files
committed
Only for constants.
1 parent 9a207c5 commit f8140fd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Analysis/ValueTracking.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,6 +1561,9 @@ static void computeKnownBitsFromOperator(const Operator *I,
15611561
// D69571).
15621562
SimplifyQuery RecQ = Q.getWithoutCondContext();
15631563

1564+
if (isa<GetElementPtrInst>(BO) && !isa<Constant>(L))
1565+
break;
1566+
15641567
unsigned OpNum = P->getOperand(0) == R ? 0 : 1;
15651568
Instruction *RInst = P->getIncomingBlock(OpNum)->getTerminator();
15661569
Instruction *LInst = P->getIncomingBlock(1 - OpNum)->getTerminator();

0 commit comments

Comments
 (0)