Add a note.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118337 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2010-11-06 10:37:16 +00:00
parent c7a03fbe66
commit 019e378754

View File

@ -1963,3 +1963,15 @@ bb3: ; preds = %entry
ret i32 %b
}
//===---------------------------------------------------------------------===//
We should fold this code into "ret i1 false" since neither %zero nor %one can
ever be null pointers.
define i1 @foo(i1 %cond) {
%zero = alloca i32
%one = alloca i32
%ptr = select i1 %cond, i32* %zero, i32* %one
%isnull = icmp eq i32* %ptr, null
ret i1 %isnull
}
//===---------------------------------------------------------------------===//