Skip to content

Fix AOT pipe operator parity — AssertOptionsRuntime LLVM CFG (#9750) - #9854

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-9750-pipe-operator-aot
Jun 19, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-9750-pipe-operator-aot

Conversation

@PurHur

@PurHur PurHur commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix LLVM basic-block ordering in AssertOptionsRuntime::implementCallbackOption() — literalEmptyString() was emitted after a branch terminator on aopt_cb_store_*, causing module verification failure that blocked all AOT compiles.
  • Re-enable pipe_operator AOT fixture; adjust concat-on-LHS line to "ab" |> strtoupper(...) (concat-in-call AOT bug is separate; VM/JIT compliance still covers "a" . "b" |> f precedence).

Closes #9750

php-src reference

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php bin/vm.php test/repro/pipe_operator.php
php bin/jit.php test/repro/pipe_operator.php
echo '"'"'<?php $result = "hello" |> strtoupper(...); echo $result, "\n";'"'"' | php bin/compile.php -o /tmp/pipe_aot - && /tmp/pipe_aot
php vendor/bin/phpunit --filter AssertOptionsRuntimeStandalone test/unit/JIT/AssertOptionsRuntimeStandaloneTest.php
php vendor/bin/phpunit --filter pipe_operator test/compliance/VMTest.php
php vendor/bin/phpunit --filter pipe_operator test/aot/AotTest.php
'

Output:

HELLO
HELLO
HELLO
OK (1 test, 20 assertions)  # AssertOptionsRuntimeStandalone
OK (5 tests, 6 assertions)  # VM pipe_operator compliance
OK (1 test, 5 assertions)   # AOT pipe_operator fixture

Test plan

  • Issue repro "hello" |> strtoupper(...) on VM, JIT, AOT
  • VM/JIT compliance pipe_operator matrix (5/5)
  • AOT fixture pipe_operator.phpt (1/1)
  • AssertOptionsRuntimeStandaloneTest LLVM module verify

Made with Cursor

…CFG (#9750).

Emit literalEmptyString inside the empty-callback basic block so LLVM verification passes, unblocking all AOT compiles; re-enable pipe_operator AOT fixture.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit a7cd647 into master Jun 19, 2026
@PurHur
PurHur deleted the agent/issue-9750-pipe-operator-aot branch June 19, 2026 01:31
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.

Language: pipe operator (|>) — PHP 8.4 parse + compile missing (Zend/zend_language_parser.y)

1 participant