[PATCH] D159499: [InstCombine] Fold or(phi1,phi2) into or(icmp1,icmp2)
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 19 11:09:33 PDT 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:2030
+ m_ICmp(EqPred, m_Specific(operand->get()), m_Zero())) &&
+ EqPred == ICmpInst::ICMP_NE))))
+ return nullptr;
----------------
This seems very much so like a DAG type fold where you are basing the decision on existing expressions.
`phi` doesn't exist in backend (dagcombiner) so its a bit tricky.
@nikic, any place this can be put where it doesn't req iterating the use-list?
generally in instcombine we get our duplication by just blindly canoniclizing to a standard format.
Is there a regression if you blindly do the transform?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159499/new/
https://reviews.llvm.org/D159499
More information about the llvm-commits
mailing list