mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
[NVPTX] Fix logic error in loading vector parameters of more than 4 components
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194409 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4c433cf673
commit
0df3ce333b
@ -1595,7 +1595,7 @@ SDValue NVPTXTargetLowering::LowerFormalArguments(
|
||||
}
|
||||
Ofst += TD->getTypeAllocSize(VecVT.getTypeForEVT(F->getContext()));
|
||||
}
|
||||
InsIdx += VecSize;
|
||||
InsIdx += NumElts;
|
||||
}
|
||||
|
||||
if (NumElts > 0)
|
||||
|
13
test/CodeGen/NVPTX/vec8.ll
Normal file
13
test/CodeGen/NVPTX/vec8.ll
Normal file
@ -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…
x
Reference in New Issue
Block a user