Skip to content

Perf: typed int **111 / pow(n,111) chained smul omit llvm.pow.f64 (#36386) - #37722

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-36386-pow-hundredeleventh-111
Sep 18, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-36386-pow-hundredeleventh-111

Conversation

@PurHur

@PurHur PurHur commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Summary

php-src: Zend/zend_operators.c pow_function / zend_pow / mul_function; ext/standard/math.c PHP_FUNCTION(pow).

Test plan

  • ./script/phpunit.sh --filter 'NoThrowPowHundredeleventhMulAotTest' → OK (4 tests, 23 assertions)
  • ./script/aot-smoke.sh → 9 passed, 0 failed (+ size gate OK)
  • ./script/differential-sweep.sh --aot --repeat 3 --dir test/differential/cases/_pow111_only → 1/1 match Zend (temp dir with pow_hundredeleventh_smul_36386.php only; removed after)
  • php script/check-size-budgets.php → OK (157 entries)

Made with Cursor

…6386)

Lower compile-time exponent 111 via (hundredtenth×n) chained smul.with.overflow
in JitPowIntegerEmitHigh — omit llvm.pow.f64. Odd: (-1)**111 === -1.
Append-only (no new spine TU).

php-src: Zend/zend_operators.c pow_function/zend_pow; ext/standard/math.c
PHP_FUNCTION(pow).

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant