[llvm] [InstCombine] Try optimizing with knownbits which determined from Cond (PR #91762)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 13:34:00 PDT 2024


================
@@ -1790,6 +1790,159 @@ static Instruction *foldSelectICmpEq(SelectInst &SI, ICmpInst *ICI,
   return nullptr;
 }
 
+// ICmpInst of SelectInst is not included in the calculation of KnownBits
+// so we are missing the opportunity to optimize the Value of the True or
+// False Condition via ICmpInst with KnownBits.
----------------
goldsteinn wrote:

Still feel like the code fits better in `foldSelectValueEquivilence`

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


More information about the llvm-commits mailing list