File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3044,12 +3044,15 @@ Function *SPIRVToLLVM::transFunction(SPIRVFunction *BF) {
30443044 auto BA = BF->getArgument (I->getArgNo ());
30453045 mapValue (BA, &(*I));
30463046 setName (&(*I), BA);
3047+ AttributeMask IllegalAttrs = AttributeFuncs::typeIncompatible (I->getType ());
30473048 BA->foreachAttr ([&](SPIRVFuncParamAttrKind Kind) {
30483049 // Skip this function parameter attribute as it will translated among
30493050 // OpenCL metadata
30503051 if (Kind == FunctionParameterAttributeRuntimeAlignedINTEL)
30513052 return ;
30523053 Attribute::AttrKind LLVMKind = SPIRSPIRVFuncParamAttrMap::rmap (Kind);
3054+ if (IllegalAttrs.contains (LLVMKind))
3055+ return ;
30533056 Type *AttrTy = nullptr ;
30543057 switch (LLVMKind) {
30553058 case Attribute::AttrKind::ByVal:
Original file line number Diff line number Diff line change 1- ; XFAIL: *
2-
31; RUN: llvm-as %s -o %t.bc
42; RUN: llvm-spirv %t.bc -spirv-text -o - | FileCheck %s --check-prefix=CHECK-SPIRV
53; RUN: llvm-spirv %t.bc -o %t.spv
You can’t perform that action at this time.
0 commit comments