[PATCH] D110038: [InstCombine] move add after min/max intrinsic

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 19 08:12:27 PDT 2021


lebedev.ri added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:766
+
+  // TODO: Match vectors with undef elements, but undef may not propagate.
+  Value *Op0 = II->getArgOperand(0), *Op1 = II->getArgOperand(1);
----------------
Even without `undef`/`poison` elts, can this not support constant vectors from the beginning?


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:790
+  }
+  assert(!Overflow && "Expected simplify of min/max");
+
----------------
I'm not sure what this assertion is doing.
Perhaps you want to initialize `Overflow` to `true`?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110038/new/

https://reviews.llvm.org/D110038



More information about the llvm-commits mailing list