https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/72072
Remove bitcast added back in dcd74716f9d18 . >From b9db2565d3d2d251bde7cd84b704861d5b41bd14 Mon Sep 17 00:00:00 2001 From: JOE1994 <joseph942...@gmail.com> Date: Sun, 12 Nov 2023 20:04:44 -0500 Subject: [PATCH] [clang][CGExprScalar] Remove no-op ptr-to-ptr bitcast (NFC) Remove bitcast added back in dcd74716f9d18 . --- clang/lib/CodeGen/CGExprScalar.cpp | 8 -------- 1 file changed, 8 deletions(-) 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; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits