We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 709a45f commit cd23a07Copy full SHA for cd23a07
1 file changed
Tools/cases_generator/optimizer_generator.py
@@ -253,14 +253,15 @@ def replace_opcode_if_evaluates_pure(
253
},
254
}
255
256
- input_count = len(used_stack_inputs)
+ output_index = -1
257
for idx, outp in enumerate(reversed(uop.stack.outputs)):
258
if outp.name == output_identifier.text:
259
output_index = idx
260
break
261
else:
262
raise analysis_error(f"Could not find output {output_identifier.text} in uop.", output_identifier)
263
assert output_index >= 0
264
+ input_count = len(used_stack_inputs)
265
if input_count in input_count_to_uop and output_index in input_count_to_uop[input_count]:
266
replacement_uop = input_count_to_uop[input_count][output_index]
267
input_desc = "one input" if input_count == 1 else "two inputs"
0 commit comments