[llvm-commits] [llvm] r75098 - /llvm/trunk/lib/Target/README.txt

Nick Lewycky nicholas at mxc.ca
Wed Jul 8 21:03:30 PDT 2009


Author: nicholas
Date: Wed Jul  8 23:03:30 2009
New Revision: 75098

URL: http://llvm.org/viewvc/llvm-project?rev=75098&view=rev
Log:
Move PR4517 to README.txt.

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=75098&r1=75097&r2=75098&view=diff

==============================================================================
--- llvm/trunk/lib/Target/README.txt (original)
+++ llvm/trunk/lib/Target/README.txt Wed Jul  8 23:03:30 2009
@@ -1677,3 +1677,25 @@
 
 
 //===---------------------------------------------------------------------===//
+
+I saw this constant expression in real code after llvm-g++ -O2:
+
+declare extern_weak i32 @0(i64)
+
+define void @foo() {
+  br i1 icmp eq (i32 zext (i1 icmp ne (i32 (i64)* @0, i32 (i64)* null) to i32),
+i32 0), label %cond_true, label %cond_false
+cond_true:
+  ret void
+cond_false:
+  ret void
+}
+
+That branch expression should be reduced to:
+
+  i1 icmp eq (i32 (i64)* @0, i32 (i64)* null)
+
+It's probably not a perf issue, I just happened to see it while examining
+something else and didn't want to forget about it.
+
+//===---------------------------------------------------------------------===//





More information about the llvm-commits mailing list