[llvm] [SelectOpt] Add handling for not conditions. (PR #92517)
Sjoerd Meijer via llvm-commits
llvm-commits at lists.llvm.org
Mon May 20 01:38:26 PDT 2024
================
@@ -195,7 +218,9 @@ class SelectOptimizeImpl {
/// Return the false value for the SelectLike instruction. For example the
/// getFalseValue of a select or `x` in `or(zext(c), x)` (which is
/// `select(c, x|1, x)`)
- Value *getFalseValue() const {
+ Value *getFalseValue(bool HonorInverts = true) const {
+ if (Inverted && HonorInverts)
+ return getTrueValue(false);
----------------
sjoerdmeijer wrote:
Nit: do we need to add `/* HonorInverts */`?
https://github.com/llvm/llvm-project/pull/92517
More information about the llvm-commits
mailing list