[PATCH] D52494: [InstCombine] Handle vector compares in foldGEPIcmp(), take 2

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 26 12:33:57 PDT 2018


lebedev.ri added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:911
 
+      // If we're going to replace the ICmp, we must end up with the same type.
+      const auto& CompatibleAsICmp = [](Value* Src, Value* Dst) -> bool {
----------------
I don't know it, but wouldn't it be possible to compare the types themselves directly?
How does `icmp` ensure that the types are compatible?


Repository:
  rL LLVM

https://reviews.llvm.org/D52494





More information about the llvm-commits mailing list