Skip to content

Commit

Permalink
[SPIR-V] Revert "[SPIR-V] Add W/A for readnone function parameter att…
Browse files Browse the repository at this point in the history
…ribute (#7669)" (#15298)

This reverts commit f872048.
  • Loading branch information
maarquitos14 authored Sep 16, 2024
1 parent dba4b3f commit a29bcd6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions llvm-spirv/lib/SPIRV/SPIRVWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -917,10 +917,7 @@ SPIRVFunction *LLVMToSPIRVBase::transFunctionDecl(Function *F) {
if (Attrs.hasParamAttr(ArgNo, Attribute::ReadOnly))
BA->addAttr(FunctionParameterAttributeNoWrite);
if (Attrs.hasParamAttr(ArgNo, Attribute::ReadNone))
// TODO: intel/llvm customization
// see https://github.com/intel/llvm/issues/7592
// Need to return FunctionParameterAttributeNoReadWrite
BA->addAttr(FunctionParameterAttributeNoWrite);
BA->addAttr(FunctionParameterAttributeNoReadWrite);
if (Attrs.hasParamAttr(ArgNo, Attribute::ZExt))
BA->addAttr(FunctionParameterAttributeZext);
if (Attrs.hasParamAttr(ArgNo, Attribute::SExt))
Expand Down
4 changes: 2 additions & 2 deletions llvm-spirv/test/transcoding/builtin_function_readnone_attr.ll
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
; CHECK-SPIRV: Name [[#B:]] "b"
; CHECK-SPIRV: Decorate [[#A]] FuncParamAttr 5
; CHECK-SPIRV: Decorate [[#A]] FuncParamAttr 6
; CHECK-SPIRV: Decorate [[#B]] FuncParamAttr 5
; CHECK-SPIRV: Decorate [[#B]] FuncParamAttr 7

; CHECK-LLVM: {{.*}}void @test_builtin_readnone(ptr nocapture readonly %{{.*}}, ptr nocapture readonly %{{.*}})
; CHECK-LLVM: {{.*}}void @test_builtin_readnone(ptr nocapture readonly %{{.*}}, ptr nocapture readnone %{{.*}})

target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "spir-unknown-unknown"
Expand Down

0 comments on commit a29bcd6

Please sign in to comment.