summaryrefslogtreecommitdiff
path: root/llvm/lib/Target/DirectX/DXILPrepare.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/DirectX/DXILPrepare.cpp')
-rw-r--r--llvm/lib/Target/DirectX/DXILPrepare.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/DirectX/DXILPrepare.cpp b/llvm/lib/Target/DirectX/DXILPrepare.cpp
index 660ca415b1a4..026911946b47 100644
--- a/llvm/lib/Target/DirectX/DXILPrepare.cpp
+++ b/llvm/lib/Target/DirectX/DXILPrepare.cpp
@@ -98,7 +98,7 @@ class DXILPrepareModule : public ModulePass {
PointerType *PtrTy = cast<PointerType>(Operand->getType());
return Builder.Insert(
CastInst::Create(Instruction::BitCast, Operand,
- Builder.getInt8PtrTy(PtrTy->getAddressSpace())));
+ Builder.getPtrTy(PtrTy->getAddressSpace())));
}
public:
@@ -154,7 +154,7 @@ public:
if (auto GEP = dyn_cast<GetElementPtrInst>(&I)) {
if (Value *NoOpBitcast = maybeGenerateBitcast(
Builder, PointerTypes, I, GEP->getPointerOperand(),
- GEP->getResultElementType()))
+ GEP->getSourceElementType()))
GEP->setOperand(0, NoOpBitcast);
continue;
}