[PATCH] D101191: [InstCombine] Fully disable select to and/or i1 folding
Juneyoung Lee via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 23 20:53:58 PDT 2021
aqjune added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:2680
+ // select c, (select a, true, b), false -> select c, a, false
+ // if c implies that b is false.
+ if (match(CondVal, m_Select(m_Value(A), m_One(), m_Value(B))) &&
----------------
I guess `isImpliedCondition` is assuming that LHS and RHS are never poison, but this transformation is still correct even if c or b is poison.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101191/new/
https://reviews.llvm.org/D101191
More information about the cfe-commits
mailing list