Skip to content

[InstCombine] Propagate FMF from select instead of fcmp #141010

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dtcxzyw
Copy link
Member

@dtcxzyw dtcxzyw commented May 22, 2025

Related commit: 3d6b539
Closes #140994.

dtcxzyw added a commit that referenced this pull request May 28, 2025
…ndle more cases (#141015)

This patch was originally part of
#139861. It generalizes
`ignoreSignBitOfZero/NaN` to handle more instructions/intrinsics.

BTW, I find it mitigates performance regressions caused by
#141010 (IR diff
https://github.com/dtcxzyw/llvm-opt-benchmark/pull/2365/files). We don't
need to propagate FMF from fcmp into select, since we can infer demanded
properties from the user of select.
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request May 28, 2025
…o/NaN to handle more cases (#141015)

This patch was originally part of
llvm/llvm-project#139861. It generalizes
`ignoreSignBitOfZero/NaN` to handle more instructions/intrinsics.

BTW, I find it mitigates performance regressions caused by
llvm/llvm-project#141010 (IR diff
https://github.com/dtcxzyw/llvm-opt-benchmark/pull/2365/files). We don't
need to propagate FMF from fcmp into select, since we can infer demanded
properties from the user of select.
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.

[InstCombine] (fcmp une T, F) ? T : F --> T should not rely on the nsz flag on fcmp
1 participant