mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
[NVPTX] Fix off-by-one error when creating the VT list for an SDNode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196503 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4012c30ef7
commit
7add5421a6
@ -2014,7 +2014,7 @@ SDNode *NVPTXDAGToDAGISel::SelectLoadParam(SDNode *Node) {
|
|||||||
VTs = CurDAG->getVTList(EltVT, EltVT, MVT::Other, MVT::Glue);
|
VTs = CurDAG->getVTList(EltVT, EltVT, MVT::Other, MVT::Glue);
|
||||||
} else {
|
} else {
|
||||||
EVT EVTs[] = { EltVT, EltVT, EltVT, EltVT, MVT::Other, MVT::Glue };
|
EVT EVTs[] = { EltVT, EltVT, EltVT, EltVT, MVT::Other, MVT::Glue };
|
||||||
VTs = CurDAG->getVTList(&EVTs[0], 5);
|
VTs = CurDAG->getVTList(&EVTs[0], array_lengthof(EVTs));
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned OffsetVal = cast<ConstantSDNode>(Offset)->getZExtValue();
|
unsigned OffsetVal = cast<ConstantSDNode>(Offset)->getZExtValue();
|
||||||
|
10
test/CodeGen/NVPTX/ldparam-v4.ll
Normal file
10
test/CodeGen/NVPTX/ldparam-v4.ll
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
|
||||||
|
|
||||||
|
declare <4 x float> @bar()
|
||||||
|
|
||||||
|
define void @foo(<4 x float>* %ptr) {
|
||||||
|
; CHECK: ld.param.v4.f32
|
||||||
|
%val = tail call <4 x float> @bar()
|
||||||
|
store <4 x float> %val, <4 x float>* %ptr
|
||||||
|
ret void
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user