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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 08:38:25 PDT 2020


spatel added inline comments.


================
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;
----------------
nikic wrote:
> Wouldn't you just be replacing one non-constant with another non-constant in that case?
Yes, seems unlikely that variable -> variable substitution would be worth doing. I'll remove the TODO note.


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

https://reviews.llvm.org/D78582





More information about the llvm-commits mailing list