[PATCH] D45317: Canonicalization of the min/max patterns.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 9 06:31:12 PDT 2018


spatel added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:2714
+    SelectPatternFlavor SPF = matchSelectPattern(Op0, LHS, RHS).Flavor;
+    if (SelectPatternResult::isMinOrMax(SPF) && match(Op1, m_AllOnes())) {
+      Value *X;
----------------
We need to check (and add regression test) if the min/max hasOneUse().


Repository:
  rL LLVM

https://reviews.llvm.org/D45317





More information about the llvm-commits mailing list