[PATCH] D16780: AMDGPU: Remove a fixme for ptrrtoint handling
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 1 12:14:26 PST 2016
arsenm created this revision.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.
Herald added a subscriber: arsenm.
We should not attempt to handle ptrtoint and just give up.
Also use cast<> instead of dyn_cast It should be
impossible to have an alloca with a user which is
not an instruction.
http://reviews.llvm.org/D16780
Files:
lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
Index: lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
===================================================================
--- lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
+++ lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
@@ -412,9 +412,8 @@
continue;
}
- // FIXME: Correctly handle ptrtoint instructions.
- Instruction *UseInst = dyn_cast<Instruction>(User);
- if (UseInst && UseInst->getOpcode() == Instruction::PtrToInt)
+ Instruction *UseInst = cast<Instruction>(User);
+ if (UseInst->getOpcode() == Instruction::PtrToInt)
return false;
if (StoreInst *SI = dyn_cast_or_null<StoreInst>(UseInst)) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16780.46564.patch
Type: text/x-patch
Size: 631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160201/859b7ffb/attachment.bin>
More information about the llvm-commits
mailing list