Fix ldm / stm unified syntax; add t2LDM_RET.
[oota-llvm.git] / lib / Target / README.txt
index 767a18dc2252091982dd5b50ff232455f08762c8..be7bb3a53ecce451eaf65880b3fa5065d23f7b78 100644 (file)
@@ -125,7 +125,7 @@ specific vector types are target dependent.
 
 //===---------------------------------------------------------------------===//
 
-We should and produce and unaligned load from code like this:
+We should produce an unaligned load from code like this:
 
 v4sf example(float *P) {
   return (v4sf){P[0], P[1], P[2], P[3] };
@@ -749,16 +749,6 @@ be done safely if "b" isn't modified between the strlen and memcpy of course.
 
 //===---------------------------------------------------------------------===//
 
-We should be able to evaluate this loop:
-
-int test(int x_offs) {
-  while (x_offs > 4)
-     x_offs -= 4;
-  return x_offs;
-}
-
-//===---------------------------------------------------------------------===//
-
 Reassociate should turn things like:
 
 int factorial(int X) {
@@ -1686,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.
+
 //===---------------------------------------------------------------------===//