Skip to content

Commit

Permalink
ExtractIRForPassTest: use %dxopt on the RUN line (microsoft#6519)
Browse files Browse the repository at this point in the history
Also, emit a better message when the desired pass does not exist (or is
mis-spelled). Before this change, there would only be a confusing
message about 'after' being None.
  • Loading branch information
dneto0 authored May 10, 2024
1 parent 35de501 commit 8e9cefa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utils/hct/ExtractIRForPassTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ def SplitAtPass(passes, pass_name, invocation=1):
after = [line]
continue
before.append(line)
if after is None:
raise Exception(f"no such pass: {pass_name}")

return before, after


Expand Down Expand Up @@ -143,7 +146,7 @@ def main(args):
# 6. Inserts RUN line with -hlsl-passes-resume and desired pass
with open(args.output_file, "wt") as f:
f.write(
"; RUN: %opt %s -hlsl-passes-resume -{} -S | FileCheck %s\n\n".format(
"; RUN: %dxopt %s -hlsl-passes-resume -{} -S | FileCheck %s\n\n".format(
args.desired_pass
)
)
Expand Down

0 comments on commit 8e9cefa

Please sign in to comment.