Skip to content

clang: Remove unnecessary pointer bitcast #138857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2025

Conversation

arsenm
Copy link
Contributor

@arsenm arsenm commented May 7, 2025

No description provided.

Copy link
Contributor Author

arsenm commented May 7, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@arsenm arsenm added the clang:codegen IR generation bugs: mangling, exceptions, etc. label May 7, 2025 — with Graphite App
@arsenm arsenm marked this pull request as ready for review May 7, 2025 12:38
@llvmbot llvmbot added the clang Clang issues not falling into any other category label May 7, 2025
@llvmbot
Copy link
Member

llvmbot commented May 7, 2025

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-codegen

Author: Matt Arsenault (arsenm)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/138857.diff

1 Files Affected:

  • (modified) clang/lib/CodeGen/CGPointerAuth.cpp (-1)
diff --git a/clang/lib/CodeGen/CGPointerAuth.cpp b/clang/lib/CodeGen/CGPointerAuth.cpp
index 0a183a8524c17..474848c8324f3 100644
--- a/clang/lib/CodeGen/CGPointerAuth.cpp
+++ b/clang/lib/CodeGen/CGPointerAuth.cpp
@@ -724,7 +724,6 @@ Address Address::getResignedAddress(const CGPointerAuthInfo &NewInfo,
     Val = CGF.emitPointerAuthResign(getBasePointer(), QualType(), CurInfo,
                                     NewInfo, isKnownNonNull());
 
-  Val = CGF.Builder.CreateBitCast(Val, getType());
   return Address(Val, getElementType(), getAlignment(), NewInfo,
                  /*Offset=*/nullptr, isKnownNonNull());
 }

Copy link
Collaborator

@efriedma-quic efriedma-quic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arsenm arsenm merged commit 9808e1f into main May 7, 2025
13 of 15 checks passed
@arsenm arsenm deleted the users/arsenm/clang/remove-typed-pointer-bitcast branch May 7, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:codegen IR generation bugs: mangling, exceptions, etc. clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants