mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 15:39:06 +00:00
[NVPTX] Fix crash with unnamed struct arguments
Patch by Eric Holk git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169418 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eef7b6219e
commit
2f1086137d
@ -957,7 +957,7 @@ bool llvm::isImageOrSamplerVal(const Value *arg, const Module *context) {
|
||||
return false;
|
||||
|
||||
const StructType *STy = dyn_cast<StructType>(PTy->getElementType());
|
||||
const std::string TypeName = STy ? STy->getName() : "";
|
||||
const std::string TypeName = STy && !STy->isLiteral() ? STy->getName() : "";
|
||||
|
||||
for (int i = 0, e = array_lengthof(specialTypes); i != e; ++i)
|
||||
if (TypeName == specialTypes[i])
|
||||
|
5
test/CodeGen/NVPTX/tuple-literal.ll
Normal file
5
test/CodeGen/NVPTX/tuple-literal.ll
Normal file
@ -0,0 +1,5 @@
|
||||
; RUN: llc < %s -march=nvptx -mcpu=sm_13
|
||||
|
||||
define ptx_device void @test_function({i8, i8}*) {
|
||||
ret void
|
||||
}
|
Loading…
Reference in New Issue
Block a user