Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4822,7 +4822,9 @@ void DAGTypeLegalizer::ExpandIntRes_XMULO(SDNode *N,

Type *RetTy = VT.getTypeForEVT(*DAG.getContext());
EVT PtrRangeVT = TLI.getPointerRangeTy(DAG.getDataLayout());
Type *PtrTy = PtrRangeVT.getTypeForEVT(*DAG.getContext());
EVT PtrVT = TLI.getPointerTy(DAG.getDataLayout(),
DAG.getDataLayout().getProgramAddressSpace());
Type *PtrTy = PtrVT.getTypeForEVT(*DAG.getContext());

// Replace this with a libcall that will check overflow.
RTLIB::Libcall LC = RTLIB::UNKNOWN_LIBCALL;
Expand Down Expand Up @@ -4875,7 +4877,8 @@ void DAGTypeLegalizer::ExpandIntRes_XMULO(SDNode *N,

// Also pass the address of the overflow check.
Entry.Node = Temp;
Entry.Ty = PointerType::getUnqual(PtrTy->getContext());
Entry.Ty =
PointerType::get(PtrTy, DAG.getDataLayout().getProgramAddressSpace());
Entry.IsSExt = true;
Entry.IsZExt = false;
Args.push_back(Entry);
Expand Down