forked from OSchip/llvm-project
[NVPTX] Fix logic error in loading vector parameters of more than 4 components
llvm-svn: 194409
This commit is contained in:
parent
e77f78cbad
commit
4f5bc9b33a
|
@ -1595,7 +1595,7 @@ SDValue NVPTXTargetLowering::LowerFormalArguments(
|
|||
}
|
||||
Ofst += TD->getTypeAllocSize(VecVT.getTypeForEVT(F->getContext()));
|
||||
}
|
||||
InsIdx += VecSize;
|
||||
InsIdx += NumElts;
|
||||
}
|
||||
|
||||
if (NumElts > 0)
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
|
||||
|
||||
target triple = "nvptx-unknown-cuda"
|
||||
|
||||
; CHECK: .visible .func foo
|
||||
define void @foo(<8 x i8> %a, i8* %b) {
|
||||
%t0 = extractelement <8 x i8> %a, i32 0
|
||||
; CHECK-DAG: ld.param.v4.u8
|
||||
; CHECK-DAG: ld.param.u32
|
||||
store i8 %t0, i8* %b
|
||||
ret void
|
||||
}
|
||||
|
Loading…
Reference in New Issue