[PATCH] D76149: [AssumeBundles] Use assume bundles in isKnownNonZero

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 10:52:51 PDT 2020


jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.

LGTM. One nit below and the Attributor test needs to be changed (see my 2 comments) and rebased + updated wrt check lines.



================
Comment at: llvm/lib/Analysis/AssumeBundleQueries.cpp:139
+      getKnowledgeFromOperandInAssume(*Intr, U->getOperandNo());
+  for (auto Attr : AttrKinds)
+    if (Attr == RK.AttrKind)
----------------
Nit: `const auto &AttrKind : AttrKinds)` or no auto but the type. Especially the name `Attr` is (by me) associated with `llvm::Attribute` not the kind enum.


================
Comment at: llvm/test/Transforms/Attributor/nonnull.ll:208
+; ATTRIBUTOR_OPM: define i8* @test10
+; ATTRIBUTOR_NPM: define nonnull i8* @test10
 define i8* @test10(i8* %a, i64 %n) {
----------------
We don't check these prefixes anymore. We need to create a call of test10 to see the return attirbute (I think).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76149





More information about the llvm-commits mailing list