[PATCH] D52766: [InstCombine] InstCombine and InstSimplify for minimum and maximum

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 4 07:21:01 PDT 2018


aheejin added inline comments.


================
Comment at: lib/Analysis/InstructionSimplify.cpp:4864
+    // max(X, +Inf) --> +Inf (and commuted variant)
+    bool UseNegInf = (IID == Intrinsic::minnum || IID == Intrinsic::minimum);
     const APFloat *C;
----------------
Nit: No need to enclose within () I guess..?


================
Comment at: lib/Analysis/ValueTracking.cpp:2904
+                                             Depth + 1) ||
+             cannotBeOrderedLessThanZeroImpl(I->getOperand(0), TLI, SignBitOnly,
+                                             Depth + 1);
----------------
`I->getOperand(1)`?


Repository:
  rL LLVM

https://reviews.llvm.org/D52766





More information about the llvm-commits mailing list