Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
Revert "[InstCombineCalls] Use isKnownNonNullAt() to check nullness o…
Browse files Browse the repository at this point in the history
…f passing arguments at callsite"

This reverts commit r247356.

Breaks test/Transforms/InstCombine/pr8547.ll with:

Wrong types for attribute: byval inalloca nest noalias nocapture nonnull readnone readonly sret dereferenceable(1) dereferenceable_or_null(1)
  %call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 nonnull %conv2) #0
LLVM ERROR: Broken function found, compilation aborted!

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247371 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
joker-eph committed Sep 11, 2015
1 parent 8a15ef5 commit 5db3146
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
2 changes: 1 addition & 1 deletion lib/Transforms/InstCombine/InstCombineCalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@ Instruction *InstCombiner::visitCallSite(CallSite CS) {
unsigned ArgNo = 0;
for (Value *V : CS.args()) {
if (!CS.paramHasAttr(ArgNo+1, Attribute::NonNull) &&
isKnownNonNullAt(V, CS.getInstruction(), DT, TLI)) {
isKnownNonNull(V)) {
AttributeSet AS = CS.getAttributes();
AS = AS.addAttribute(CS.getInstruction()->getContext(), ArgNo+1,
Attribute::NonNull);
Expand Down
17 changes: 0 additions & 17 deletions test/Transforms/InstCombine/call_nonnull_arg.ll

This file was deleted.

0 comments on commit 5db3146

Please sign in to comment.