aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorYingwei Zheng <dtcxzyw2333@gmail.com>2024-07-09 15:08:04 +0800
committerGitHub <noreply@github.com>2024-07-09 15:08:04 +0800
commitbe7239e5a60927f5b4932f995dc4b57423ea8534 (patch)
tree85cc92e52a1bcf7febc3fc8ebac5397f575e62f2 /llvm/lib/Analysis/InlineCost.cpp
parented51908cec879c9dff435abdc70d8b03afc35c07 (diff)
downloadllvm-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.cpp2
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;