diff --git a/llvm/lib/Target/DirectX/DXILPrepare.cpp b/llvm/lib/Target/DirectX/DXILPrepare.cpp --- a/llvm/lib/Target/DirectX/DXILPrepare.cpp +++ b/llvm/lib/Target/DirectX/DXILPrepare.cpp @@ -61,7 +61,6 @@ Attribute::OptimizeNone, Attribute::ReadNone, Attribute::ReadOnly, - Attribute::ArgMemOnly, Attribute::Returned, Attribute::ReturnsTwice, Attribute::SExt, diff --git a/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp b/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp --- a/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp +++ b/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp @@ -276,6 +276,10 @@ unsigned Abbrev) { llvm_unreachable("DXIL cannot contain DIArgList Nodes"); } + void writeDIAssignID(const DIAssignID *N, SmallVectorImpl &Record, + unsigned Abbrev) { + llvm_unreachable("DXIL cannot contain DIAssignID Nodes"); + } void writeDIModule(const DIModule *N, SmallVectorImpl &Record, unsigned Abbrev); void writeDITemplateTypeParameter(const DITemplateTypeParameter *N, @@ -661,8 +665,6 @@ return bitc::ATTR_KIND_ALIGNMENT; case Attribute::AlwaysInline: return bitc::ATTR_KIND_ALWAYS_INLINE; - case Attribute::ArgMemOnly: - return bitc::ATTR_KIND_ARGMEMONLY; case Attribute::Builtin: return bitc::ATTR_KIND_BUILTIN; case Attribute::ByVal: diff --git a/llvm/test/CodeGen/DirectX/strip-fn-attrs.ll b/llvm/test/CodeGen/DirectX/strip-fn-attrs.ll --- a/llvm/test/CodeGen/DirectX/strip-fn-attrs.ll +++ b/llvm/test/CodeGen/DirectX/strip-fn-attrs.ll @@ -1,7 +1,7 @@ ; RUN: llc %s --filetype=asm -o - | FileCheck %s target triple = "dxil-unknown-shadermodel6.7-library" -; CHECK: Function Attrs: nounwind readnone +; CHECK: Function Attrs: nounwind ; Function Attrs: norecurse nounwind readnone willreturn define dso_local float @fma(float %0, float %1, float %2) local_unnamed_addr #0 { %4 = fmul float %0, %1 @@ -9,11 +9,11 @@ ret float %5 } -; CHECK: Function Attrs: nounwind readnone +; CHECK: Function Attrs: nounwind ; Function Attrs: nofree nosync nounwind readnone speculatable willreturn declare void @llvm.dbg.value(metadata, metadata, metadata) #1 -; CHECK: attributes #0 = { nounwind readnone } +; CHECK: attributes #0 = { nounwind } ; CHECK-NOT attributes # attributes #0 = { norecurse nounwind readnone willreturn } diff --git a/llvm/test/tools/dxil-dis/attribute-filter.ll b/llvm/test/tools/dxil-dis/attribute-filter.ll --- a/llvm/test/tools/dxil-dis/attribute-filter.ll +++ b/llvm/test/tools/dxil-dis/attribute-filter.ll @@ -3,7 +3,7 @@ ; CHECK: target triple = "dxil-ms-dx" target triple = "dxil-unknown-shadermodel6.7-library" -; CHECK: Function Attrs: nounwind readnone +; CHECK: Function Attrs: nounwind ; Function Attrs: norecurse nounwind readnone willreturn define float @fma(float %0, float %1, float %2) #0 { %4 = fmul float %0, %1 @@ -11,5 +11,5 @@ ret float %5 } -; CHECK: attributes #0 = { nounwind readnone "disable-tail-calls"="false" } +; CHECK: attributes #0 = { nounwind "disable-tail-calls"="false" } attributes #0 = { norecurse nounwind readnone willreturn "disable-tail-calls"="false" }