mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
move PR6212 to this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95624 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
47afe4e806
commit
cf031f6d66
@ -1794,3 +1794,28 @@ declare void @bar() nounwind
|
||||
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;
|
||||
}
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
Loading…
Reference in New Issue
Block a user