[PATCH] D45608: [CallSiteSplit] Make sure we remove nonnull if the parameter turns out to be a constant.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 23 02:34:02 PDT 2018


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

LGTM, with the test simplification. Unfortunately there is no easy way to prevent adding the unnecessary nonnull attribute in first place.



================
Comment at: test/Transforms/CallSiteSplitting/callsite-split-or-phi.ll:577
+Top0:
+  %tobool1 = icmp eq i32* %a_elt, inttoptr (i64 4643 to  i32*) 
+  br i1 %tobool1, label %Top1, label %NextCond
----------------
Do we need inttoptr here?


================
Comment at: test/Transforms/CallSiteSplitting/callsite-split-or-phi.ll:590
+  %p = phi i1 [0, %Top1], [%c, %NextCond]
+  call void @callee2(i32* %a_elt, i32* %a_elt, i32* %b_elt, i1 %p)
+  br label %End
----------------
I don't think we need a complex callee2 function that's called here. Could you just use the existing callee function?


Repository:
  rL LLVM

https://reviews.llvm.org/D45608





More information about the llvm-commits mailing list