[clang] [clang] remove lots of "innocuous" addrspacecasts (PR #197745)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Fri May 15 08:20:21 PDT 2026


================
@@ -480,7 +479,6 @@ kernel void test_target_features_kernel(global int *i) {
 // GFX900-NEXT:    [[BLOCK_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[BLOCK]] to ptr
 // GFX900-NEXT:    [[BLOCK3_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[BLOCK3]] to ptr
 // GFX900-NEXT:    [[BLOCK12_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[BLOCK12]] to ptr
-// GFX900-NEXT:    [[BLOCK_SIZES_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[BLOCK_SIZES]] to ptr
----------------
arsenm wrote:

These cases were just dead instructions? Does that mean there's an unnecessary stripPointerCasts somewhere?

https://github.com/llvm/llvm-project/pull/197745


More information about the cfe-commits mailing list