Skip to content
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

[DAG][X86] expandABD - add branchless abds/abdu expansion for 0/-1 comparison result cases #92780

Merged
merged 1 commit into from
May 23, 2024

Commits on May 23, 2024

  1. [DAG][X86] expandABD - add branchless abds/abdu expansion for 0/-1 co…

    …mparison result cases
    
    If the comparison results are allbits masks, we can expand as "abd(lhs, rhs) -> sub(cmpgt(lhs, rhs), xor(sub(lhs, rhs), cmpgt(lhs, rhs)))", replacing a sub+sub+select pattern with the simpler sub+xor+sub pattern.
    
    This allows us to remove a lot of X86 specific legalization code, and will be useful in future generic expansion for the legalization work in llvm#92576
    
    Alive2: https://alive2.llvm.org/ce/z/sj863C
    RKSimon committed May 23, 2024
    Configuration menu
    Copy the full SHA
    3e349c9 View commit details
    Browse the repository at this point in the history