[llvm] [GlobalIsel] Combine logic of icmps (PR #77855)

Thorsten Schütt via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 00:21:54 PST 2024


================
@@ -6643,3 +6644,178 @@ bool CombinerHelper::matchSelect(MachineInstr &MI, BuildFnTy &MatchInfo) {
 
   return false;
 }
+
+/// Fold (icmp Pred1 V1, C1) && (icmp Pred2 V2, C2)
+/// or   (icmp Pred1 V1, C1) || (icmp Pred2 V2, C2)
+/// into a single comparison using range-based reasoning.
+/// see InstCombinerImpl::foldAndOrOfICmpsUsingRanges.
----------------
tschuett wrote:

It is a private member function of the CombinerHelper. It is only called from matchAnd and matchOr.

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


More information about the llvm-commits mailing list