feilongjiang opened PR #7699 from feilongjiang:fix_arm64_pcc_on_32bit_movn
to bytecodealliance:main
:
Hi team, find another PCC fact range issue on AArch64.
When the top 32 bits of the value are zero and the upper_halfword of the lower 32 bits is u16::MAX, load_constant64_full will emit a singlemovn
instruction. In that case, add_range_fact only adds lower_halfword as the fact range, which misses the upper halfword value. We should add the hole 32-bit value as the fact range.Here is a simple test to reproduce the issue:
;; test_const.wat (module (func (export "test_constant") (result i64) (i64.const 0xfffffff7)) )
Step to reproduce:
Compile the test with PCC on:
target/debug/wasmtime compile -C pcc=y test_const.wat
the output will be:
Error: Compilation error: Proof-carrying-code validation error: UnsupportedFact
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
feilongjiang requested abrown for a review on PR #7699.
feilongjiang requested wasmtime-compiler-reviewers for a review on PR #7699.
feilongjiang commented on PR #7699:
Hi @fitzgen, would you please take a look?
github-actions[bot] commented on PR #7699:
Subscribe to Label Action
cc @cfallin, @fitzgen
<details>
This issue or pull request has been labeled: "cranelift", "cranelift:area:aarch64", "isle"Thus the following users have been cc'd because of the following labels:
- cfallin: isle
- fitzgen: isle
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
fitzgen submitted PR review:
Thanks!
fitzgen merged PR #7699.
Last updated: Nov 22 2024 at 16:03 UTC