move PR6212 to this file.

llvm-svn: 95624
This commit is contained in:
Chris Lattner 2010-02-09 00:11:10 +00:00
parent 819e54b65c
commit 187242b3ab
1 changed files with 25 additions and 0 deletions

View File

@ -1794,3 +1794,28 @@ declare void @bar() nounwind
The shift should be eliminated. Testcase derived from gcc. 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;
}
//===---------------------------------------------------------------------===//