[llvm] [InstCombine] Optimize 'xor-and-select' sequence to 'or' for bool (PR #66394)

Bryan Chan via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 14 09:22:00 PDT 2023


================
@@ -3202,6 +3202,14 @@ Instruction *InstCombinerImpl::foldSelectOfBools(SelectInst &SI) {
     }
   }
 
+  // select (~b & a), a, b -> or a, b
+  // only for scalar types
----------------
bryanpkc wrote:

Shouldn't this say `only for scalar i1 values`?

https://github.com/llvm/llvm-project/pull/66394


More information about the llvm-commits mailing list