This pass will upgrade DXIL-style llvm constructs (which are mostly metadata) into the representations we use in LLVM for the same concepts. For now we just strip the valver metadata, which we don't need. Later changes will make this pass more useful, and then we should be able to wire it into clang and possibly the DirectX backend's AsmParser.
19 lines
417 B
LLVM
19 lines
417 B
LLVM
; RUN: opt -passes=dxil-upgrade -S < %s | FileCheck %s
|
|
|
|
; Ensure that both the valver metadata and its operand are removed.
|
|
; CHECK: !unrelated_md1 = !{!0}
|
|
; CHECK-NOT: !dx.valver
|
|
; CHECK: !unrelated_md2 = !{!1}
|
|
;
|
|
; CHECK: !0 = !{i32 1234}
|
|
; CHECK-NOT: !{i32 1, i32 7}
|
|
; CHECK: !1 = !{i32 4321}
|
|
|
|
!unrelated_md1 = !{!0}
|
|
!dx.valver = !{!1}
|
|
!unrelated_md2 = !{!2}
|
|
|
|
!0 = !{i32 1234}
|
|
!1 = !{i32 1, i32 7}
|
|
!2 = !{i32 4321}
|