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

Commit 5db3146

Browse files
committed
Revert "[InstCombineCalls] Use isKnownNonNullAt() to check nullness of 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 <[email protected]> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247371 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 8a15ef5 commit 5db3146

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

lib/Transforms/InstCombine/InstCombineCalls.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@ Instruction *InstCombiner::visitCallSite(CallSite CS) {
15371537
unsigned ArgNo = 0;
15381538
for (Value *V : CS.args()) {
15391539
if (!CS.paramHasAttr(ArgNo+1, Attribute::NonNull) &&
1540-
isKnownNonNullAt(V, CS.getInstruction(), DT, TLI)) {
1540+
isKnownNonNull(V)) {
15411541
AttributeSet AS = CS.getAttributes();
15421542
AS = AS.addAttribute(CS.getInstruction()->getContext(), ArgNo+1,
15431543
Attribute::NonNull);

test/Transforms/InstCombine/call_nonnull_arg.ll

-17
This file was deleted.

0 commit comments

Comments
 (0)