[PATCH] D138526: [SimpleLoopUnswitch][reland 2] unswitch selects
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 25 00:16:33 PDT 2023
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:2877
+ // restrict to simple boolean selects
+ if (!isa<Constant>(Cond) && L.isLoopInvariant(Cond) && Cond->getType()->isIntegerTy(1))
+ UnswitchCandidates.push_back({&I, {Cond}});
----------------
I think this also needs a check that `!SI->getType()->isInteger(1)`. We don't want to unswitch logical and/or through this code path, we have separate handling for unswitching of complex conditions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138526/new/
https://reviews.llvm.org/D138526
More information about the llvm-commits
mailing list