Bug report
Bug description:
Please apply this fix:
diff --git a/Tools/cases_generator/optimizer_generator.py b/Tools/cases_generator/optimizer_generator.py
index b6b59838a70..784e1a8a2d1 100644
--- a/Tools/cases_generator/optimizer_generator.py
+++ b/Tools/cases_generator/optimizer_generator.py
@@ -412,6 +412,7 @@ def write_uop(
args.append(input.name)
out.emit(f'DEBUG_PRINTF({", ".join(args)});\n')
if override:
+ idx = 0
for cache in uop.caches:
if cache.name != "unused":
if cache.size == 4:
@@ -419,7 +420,8 @@ def write_uop(
else:
type = f"uint{cache.size*16}_t "
cast = f"uint{cache.size*16}_t"
- out.emit(f"{type}{cache.name} = ({cast})this_instr->operand0;\n")
+ out.emit(f"{type}{cache.name} = ({cast})this_instr->operand{idx};\n")
+ idx += 1
if override:
emitter = OptimizerEmitter(out, {}, uop, stack.copy())
# No reference management of inputs needed.
And add a test to Lib/test/test_generated_cases.py.
Sorry to bother you again with this @NekoAsakura , would you be wiling to take this up?
CPython versions tested on:
CPython main branch, 3.15
Operating systems tested on:
No response
Linked PRs
Bug report
Bug description:
Please apply this fix:
And add a test to
Lib/test/test_generated_cases.py.Sorry to bother you again with this @NekoAsakura , would you be wiling to take this up?
CPython versions tested on:
CPython main branch, 3.15
Operating systems tested on:
No response
Linked PRs
optimizer_generatorrespect multiple caches #148524