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

[RISCV] Break the (czero_eqz x, (setne x, 0)) -> x combine into 2 combines. #90428

Merged
merged 2 commits into from
Apr 29, 2024

Commits on Apr 29, 2024

  1. [RISCV] Break the (czero_eqz x, (setne x, 0)) -> x combine into 2 com…

    …bines.
    
    We can think of this as two separate combines
    
    (czero_eqz x, x) -> x
    and
    (czero_eqz x, (setne y, 0)) -> (czero_eqz x, y)
    
    Similary the (czero_nez x, (seteq x, 0)) -> x combine can be
    broken into
    
    (czero_eqz x, x) -> x
    and
    (czero_nez x, (seteq y, 0)) -> (czero_eqz x, y)
    
    isel already does the (czero_eqz x, (setne y, 0)) -> (czero_eqz x, y)
    and (czero_nez x, (seteq y, 0)) -> (czero_eqz x, y) combines, but
    doing them early could expose other opportunities.
    topperc committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    71af4bc View commit details
    Browse the repository at this point in the history
  2. fixup! Fix mistakes

    topperc committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    c30f921 View commit details
    Browse the repository at this point in the history