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

Chris Lattner sabre at nondot.org
Mon Feb 8 16:11:10 PST 2010


Author: lattner
Date: Mon Feb  8 18:11:10 2010
New Revision: 95624

URL: http://llvm.org/viewvc/llvm-project?rev=95624&view=rev
Log:
move PR6212 to this file.

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=95624&r1=95623&r2=95624&view=diff

==============================================================================
--- llvm/trunk/lib/Target/README.txt (original)
+++ llvm/trunk/lib/Target/README.txt Mon Feb  8 18:11:10 2010
@@ -1794,3 +1794,28 @@
 The shift should be eliminated.  Testcase derived from gcc.
 
 //===---------------------------------------------------------------------===//
+
+These compile into different code, one gets recognized as a switch and the
+other doesn't due to phase ordering issues (PR6212):
+
+int test1(int mainType, int subType) {
+  if (mainType == 7)
+    subType = 4;
+  else if (mainType == 9)
+    subType = 6;
+  else if (mainType == 11)
+    subType = 9;
+  return subType;
+}
+
+int test2(int mainType, int subType) {
+  if (mainType == 7)
+    subType = 4;
+  if (mainType == 9)
+    subType = 6;
+  if (mainType == 11)
+    subType = 9;
+  return subType;
+}
+
+//===---------------------------------------------------------------------===//





More information about the llvm-commits mailing list