[llvm] 6a0d071 - AMDGPU: Don't try to create pointer bitcasts in load widening
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 29 08:01:38 PDT 2023
Author: Matt Arsenault
Date: 2023-04-29T10:04:33-04:00
New Revision: 6a0d0711ce54465c72debbdeb5d5ea00ce87b8c9
URL: https://github.com/llvm/llvm-project/commit/6a0d0711ce54465c72debbdeb5d5ea00ce87b8c9
DIFF: https://github.com/llvm/llvm-project/commit/6a0d0711ce54465c72debbdeb5d5ea00ce87b8c9.diff
LOG: AMDGPU: Don't try to create pointer bitcasts in load widening
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp b/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
index 3d5f3354196a..bdf6c425f8f7 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
@@ -1343,9 +1343,7 @@ bool AMDGPUCodeGenPrepare::visitLoadInst(LoadInst &I) {
Builder.SetCurrentDebugLocation(I.getDebugLoc());
Type *I32Ty = Builder.getInt32Ty();
- Type *PT = PointerType::get(I32Ty, I.getPointerAddressSpace());
- Value *BitCast= Builder.CreateBitCast(I.getPointerOperand(), PT);
- LoadInst *WidenLoad = Builder.CreateLoad(I32Ty, BitCast);
+ LoadInst *WidenLoad = Builder.CreateLoad(I32Ty, I.getPointerOperand());
WidenLoad->copyMetadata(I);
// If we have range metadata, we need to convert the type, and not make
More information about the llvm-commits
mailing list