[PATCH] D78582: [InstCombine] substitute equivalent constant to reduce logic-of-icmps

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 21 14:06:25 PDT 2020


nikic added a comment.

I like this approach. I guess the main thing we lose over the more limited handling in InstSimplify is the multi-use case?



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:1151
+  // TODO: This could be loosened to work on any value (non-constant) as long as
+  //       the value is not poison or undef.
+  ICmpInst::Predicate Pred0;
----------------
Wouldn't you just be replacing one non-constant with another non-constant in that case?


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

https://reviews.llvm.org/D78582





More information about the llvm-commits mailing list