diff options
author | Yingwei Zheng <dtcxzyw2333@gmail.com> | 2024-07-09 15:08:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-09 15:08:04 +0800 |
commit | be7239e5a60927f5b4932f995dc4b57423ea8534 (patch) | |
tree | 85cc92e52a1bcf7febc3fc8ebac5397f575e62f2 /llvm/lib/Analysis/InlineCost.cpp | |
parent | ed51908cec879c9dff435abdc70d8b03afc35c07 (diff) | |
download | llvm-be7239e5a60927f5b4932f995dc4b57423ea8534.zip llvm-be7239e5a60927f5b4932f995dc4b57423ea8534.tar.gz llvm-be7239e5a60927f5b4932f995dc4b57423ea8534.tar.bz2 |
[Inline] Remove bitcast handling in `CallAnalyzer::stripAndComputeInBoundsConstantOffsets` (#97988)
As we are now using opaque pointers, bitcast handling is no longer
needed.
Closes https://github.com/llvm/llvm-project/issues/97590.
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r-- | llvm/lib/Analysis/InlineCost.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp index 94aa8ec..345e5a0 100644 --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/lib/Analysis/InlineCost.cpp @@ -2644,8 +2644,6 @@ ConstantInt *CallAnalyzer::stripAndComputeInBoundsConstantOffsets(Value *&V) { if (!GEP->isInBounds() || !accumulateGEPOffset(*GEP, Offset)) return nullptr; V = GEP->getPointerOperand(); - } else if (Operator::getOpcode(V) == Instruction::BitCast) { - V = cast<Operator>(V)->getOperand(0); } else if (GlobalAlias *GA = dyn_cast<GlobalAlias>(V)) { if (GA->isInterposable()) break; |