[clang] 7977fd7 - [OpenMP] Remove no-op cast (NFC)
Nikita Popov via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 23 06:19:15 PST 2021
Author: Nikita Popov
Date: 2021-12-23T15:15:26+01:00
New Revision: 7977fd7cfc5b60742af062ae4aef46fe400cca9d
URL: https://github.com/llvm/llvm-project/commit/7977fd7cfc5b60742af062ae4aef46fe400cca9d
DIFF: https://github.com/llvm/llvm-project/commit/7977fd7cfc5b60742af062ae4aef46fe400cca9d.diff
LOG: [OpenMP] Remove no-op cast (NFC)
This was casting the address to its own element type, which is
a no-op.
Added:
Modified:
clang/lib/CodeGen/CGOpenMPRuntime.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index fe4cca16eb53..03aa84aecef4 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -688,8 +688,6 @@ static void EmitOMPAggregateInit(CodeGenFunction &CGF, Address DestAddr,
// Drill down to the base element type on both arrays.
const ArrayType *ArrayTy = Type->getAsArrayTypeUnsafe();
llvm::Value *NumElements = CGF.emitArrayLength(ArrayTy, ElementTy, DestAddr);
- DestAddr =
- CGF.Builder.CreateElementBitCast(DestAddr, DestAddr.getElementType());
if (DRD)
SrcAddr =
CGF.Builder.CreateElementBitCast(SrcAddr, DestAddr.getElementType());
More information about the cfe-commits
mailing list