[all-commits] [llvm/llvm-project] f9d4d5: [RISCV] Break the (czero_eqz x, (setne x, 0)) -> x...
Craig Topper via All-commits
all-commits at lists.llvm.org
Mon Apr 29 10:16:19 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f9d4d54aa0cb6fbeee1e8744b379b1eac59c3afc
https://github.com/llvm/llvm-project/commit/f9d4d54aa0cb6fbeee1e8744b379b1eac59c3afc
Author: Craig Topper <craig.topper at sifive.com>
Date: 2024-04-29 (Mon, 29 Apr 2024)
Changed paths:
M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
Log Message:
-----------
[RISCV] Break the (czero_eqz x, (setne x, 0)) -> x combine into 2 combines. (#90428)
We can think of this as two separate combines
(czero_eqz x, (setne y, 0)) -> (czero_eqz x, y)
and
(czero_eqz x, x) -> x
Similary the (czero_nez x, (seteq x, 0)) -> x combine can be broken into
(czero_nez x, (seteq y, 0)) -> (czero_eqz x, y)
and
(czero_eqz x, x) -> x
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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list