[clang] [clang][CGExprScalar] Remove no-op ptr-to-ptr bitcast (NFC) (PR #72072)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 12 17:16:36 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Youngsuk Kim (JOE1994)
<details>
<summary>Changes</summary>
Remove bitcast added back in dcd74716f9d18 .
---
Full diff: https://github.com/llvm/llvm-project/pull/72072.diff
1 Files Affected:
- (modified) clang/lib/CodeGen/CGExprScalar.cpp (-8)
``````````diff
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index 1a7a3f97bb779a0..2faab20fc069ee7 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -2227,14 +2227,6 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
llvm::Value *V = CE->changesVolatileQualification()
? EmitLoadOfLValue(CE)
: Visit(const_cast<Expr *>(E));
- if (V) {
- // CK_NoOp can model a pointer qualification conversion, which can remove
- // an array bound and change the IR type.
- // FIXME: Once pointee types are removed from IR, remove this.
- llvm::Type *T = ConvertType(DestTy);
- if (T != V->getType())
- V = Builder.CreateBitCast(V, T);
- }
return V;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/72072
More information about the cfe-commits
mailing list