mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-27 05:32:22 +00:00
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:
parent
c7a03fbe66
commit
019e378754
@ -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
|
||||
}
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
Loading…
x
Reference in New Issue
Block a user