[llvm] [InstCombine] Extend `foldICmpAddConstant` to disjoint `or`. (PR #75899)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 5 20:46:27 PST 2024
================
@@ -3721,10 +3728,6 @@ Instruction *InstCombinerImpl::foldICmpBinOpWithConstant(ICmpInst &Cmp,
if (Instruction *I = foldICmpSubConstant(Cmp, BO, C))
return I;
break;
----------------
dtcxzyw wrote:
```suggestion
break;
case Instruction::Or:
if (Instruction *I = foldICmpOrConstant(Cmp, BO, C))
return I;
[[fallthrough]];
```
I prefer the switch+fallthrough approach.
https://github.com/llvm/llvm-project/pull/75899
More information about the llvm-commits
mailing list