================ @@ -0,0 +1,39 @@ +; RUN: opt -S --dxil-prepare %s | FileCheck %s + +; This test tests the whitelist inside of DxilPrepare.cpp. +; It ensures that certain metadata nodes are removed that aren't +; in the whitelist, and that certain nodes may remain that +; are on the whitelist. + +target triple = "dxilv1.0-unknown-shadermodel6.0-compute" + +; Function Attrs: noinline nounwind memory(readwrite, inaccessiblemem: none) +define void @main(i32* %ptr) { +entry: + ; metadata ID changes to 0 once the current !0 and !1 are removed + ; since they aren't in the whitelist. range needs a payload. + ; CHECK: %val = load i32, ptr %ptr, align 4, !range !0 ---------------- bogner wrote:
Better to pattern match the argument and check it later: ``` CHECK: %val = load i32, ptr %ptr, align 4, !range [[RANGEMD:![0-9]+]] ... CHECK: [RANGEMD] = !{i32 1, i32 5} ``` https://github.com/llvm/llvm-project/pull/136386 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits