[PATCH] D94730: [RISCV] Add DAG combine to turn (setcc X, 1, setne) -> (setcc X, 0, seteq) if we can prove X is 0/1.
Sam Elliott via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 15 08:36:31 PST 2021
lenary added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:1853
}
+ case ISD::SETCC: {
+ // (setcc X, 1, setne) -> (setcc X, 0, seteq) if we can prove X is 0/1.
----------------
Is this not a general purpose combine if you have the same boolean contents? Or does it hinder optimisations on other platforms with a wider variety of condition codes?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94730/new/
https://reviews.llvm.org/D94730
More information about the llvm-commits
mailing list