[PATCH] D159402: [ValueTracking] Consider assumptions in isKnownNonEqual

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 9 17:36:53 PDT 2023


goldstein.w.n added a comment.

No real compile time regressions from this:
https://llvm-compile-time-tracker.com/compare.php?from=facaede5ae43806d3123c18823cc173a4b3970ec&to=f8c93e123c527366c18f3a0b2b02b8cd629ce757&stat=instructions:uP



================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:3164
+}
+
 /// Return true if it is known that V1 != V2.
----------------
In generaly I'm not sure how valuable this is. Does it affect any of the codes in LLVM test suite or any common patterns?


================
Comment at: llvm/test/Analysis/ValueTracking/known-non-equal.ll:1857
+  ret i1 %res
+}
 
----------------
Can you pre-commit tests.
Also can you add some negative tests where the assume is 1)  out of scope 2) doesn't actually imply equality, and 3) a case like `if(X) { assume(X); ...(X) } else { ...(X) }`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D159402



More information about the llvm-commits mailing list