[llvm-commits] [llvm] r118337 - /llvm/trunk/lib/Target/README.txt
Benjamin Kramer
benny.kra at googlemail.com
Sat Nov 6 03:37:16 PDT 2010
Author: d0k
Date: Sat Nov 6 05:37:16 2010
New Revision: 118337
URL: http://llvm.org/viewvc/llvm-project?rev=118337&view=rev
Log:
Add a note.
Modified:
llvm/trunk/lib/Target/README.txt
Modified: llvm/trunk/lib/Target/README.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/README.txt?rev=118337&r1=118336&r2=118337&view=diff
==============================================================================
--- llvm/trunk/lib/Target/README.txt (original)
+++ llvm/trunk/lib/Target/README.txt Sat Nov 6 05:37:16 2010
@@ -1963,3 +1963,15 @@
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
+}
+//===---------------------------------------------------------------------===//
More information about the llvm-commits
mailing list