aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
diff options
context:
space:
mode:
authorYingwei Zheng <dtcxzyw2333@gmail.com>2024-08-13 22:38:50 +0800
committerGitHub <noreply@github.com>2024-08-13 22:38:50 +0800
commitf364b2ee22209e4072c39a153b3385806974f8b0 (patch)
tree192eb607fa3fec55c1e1e658acce3efef4130df2 /llvm/lib/Transforms/Utils/SimplifyCFG.cpp
parentf807c5e492878240fe6d7be23b930c78c4e62eba (diff)
downloadllvm-f364b2ee22209e4072c39a153b3385806974f8b0.zip
llvm-f364b2ee22209e4072c39a153b3385806974f8b0.tar.gz
llvm-f364b2ee22209e4072c39a153b3385806974f8b0.tar.bz2
[LLVM] Don't peek through bitcast on pointers and gep with zero indices. NFC. (#102889)
Since we are using opaque pointers now, we don't need to peek through bitcast on pointers and gep with zero indices.
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyCFG.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index ccdfe47..37c8761 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -7652,10 +7652,6 @@ static bool passingValueIsAlwaysUndefined(Value *V, Instruction *I, bool PtrValu
}
}
- // Look through bitcasts.
- if (BitCastInst *BC = dyn_cast<BitCastInst>(Use))
- return passingValueIsAlwaysUndefined(V, BC, PtrValueMayBeModified);
-
// Load from null is undefined.
if (LoadInst *LI = dyn_cast<LoadInst>(Use))
if (!LI->isVolatile())