Move PR4517 to README.txt.
authorNick Lewycky <nicholas@mxc.ca>
Thu, 9 Jul 2009 04:03:30 +0000 (04:03 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Thu, 9 Jul 2009 04:03:30 +0000 (04:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75098 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/README.txt

index f68cf0e40df0c89823eabf74bdde6bbe370cae8f..be7bb3a53ecce451eaf65880b3fa5065d23f7b78 100644 (file)
@@ -1676,4 +1676,26 @@ entry:
 Instcombine should be able to optimize away the loads (and thus the globals).
 
 
+//===---------------------------------------------------------------------===//
+
+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.
+
 //===---------------------------------------------------------------------===//