Skip to content

RISC-V EVL tail folding failure on SPEC CPU 2017 525.x264_r #122681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lukel97 opened this issue Jan 13, 2025 · 2 comments · Fixed by #122885
Closed

RISC-V EVL tail folding failure on SPEC CPU 2017 525.x264_r #122681

lukel97 opened this issue Jan 13, 2025 · 2 comments · Fixed by #122885

Comments

@lukel97
Copy link
Contributor

lukel97 commented Jan 13, 2025

Split out from the discussion here: #122458 (comment)

On RISC-V with -march=rva22u64_v -O3 -flto -mllvm -force-tail-folding-style=data-with-evl -mllvm -prefer-predicate-over-epilogue=predicate-else-scalar-epilogue, the SPEC CPU 2017 525.x264_r benchmark fails in the train dataset, likely due to a miscompile.

It's been failing since at least 6ad0dcf, detected from this LNT run: https://lnt.lukelau.me/db_default/v4/nts/89

@llvmbot
Copy link
Member

llvmbot commented Jan 13, 2025

@llvm/issue-subscribers-backend-risc-v

Author: Luke Lau (lukel97)

Split out from the discussion here: https://github.com//pull/122458#issuecomment-2585713670

On RISC-V with -march=rva22u64_v -O3 -flto -mllvm -force-tail-folding-style=data-with-evl -mllvm -prefer-predicate-over-epilogue=predicate-else-scalar-epilogue, the SPEC CPU 2017 525.x264_r benchmark fails in the train dataset, likely due to a miscompile.

It's been failing since at least 6ad0dcf, detected from this LNT run: https://lnt.lukelau.me/db_default/v4/nts/89

@fhahn
Copy link
Contributor

fhahn commented Jan 13, 2025

@lukel97 lukel97 self-assigned this Jan 14, 2025
lukel97 added a commit that referenced this issue Jan 14, 2025

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
…22885)

This fixes a miscompilation extracted from 525.x264_r, where we were
failing to update the runtime VF of a VPReverseVectorPointerRecipe.

We were removing a use of VF whilst iterating over the users() iterator,
which messed up the iterator in-flight and caused us to miss some
recipes. This fixes it by copying the users into a SmallVector first.

Fixes #122681
Fixes #122682
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants