diff options
author | Yingwei Zheng <dtcxzyw2333@gmail.com> | 2024-08-13 22:38:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-13 22:38:50 +0800 |
commit | f364b2ee22209e4072c39a153b3385806974f8b0 (patch) | |
tree | 192eb607fa3fec55c1e1e658acce3efef4130df2 /llvm/lib/Transforms/IPO/FunctionSpecialization.cpp | |
parent | f807c5e492878240fe6d7be23b930c78c4e62eba (diff) | |
download | llvm-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/IPO/FunctionSpecialization.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/FunctionSpecialization.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionSpecialization.cpp b/llvm/lib/Transforms/IPO/FunctionSpecialization.cpp index 2d7b735..548335d 100644 --- a/llvm/lib/Transforms/IPO/FunctionSpecialization.cpp +++ b/llvm/lib/Transforms/IPO/FunctionSpecialization.cpp @@ -481,11 +481,6 @@ Constant *FunctionSpecializer::getPromotableAlloca(AllocaInst *Alloca, // the usage in the CallInst, which is what we check here. if (User == Call) continue; - if (auto *Bitcast = dyn_cast<BitCastInst>(User)) { - if (!Bitcast->hasOneUse() || *Bitcast->user_begin() != Call) - return nullptr; - continue; - } if (auto *Store = dyn_cast<StoreInst>(User)) { // This is a duplicate store, bail out. |