diff options
author | Chris Lattner <sabre@nondot.org> | 2006-02-15 22:52:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-02-15 22:52:05 +0000 |
commit | a48654ef23c35d9d07e5c0cb80726ec788dae93a (patch) | |
tree | def98c01859200808f58a07514f4f33b56ffbc09 /lib/Target/X86/X86Subtarget.cpp | |
parent | fe1c31204e66b2e725e081614852a0e241e92f2f (diff) |
Implement trivial unswitching for switch stmts. This allows us to trivial
unswitch this loop on 2 before sweating to unswitch on 1/3.
void test4(int N, int i, int C, int*P, int*Q) {
int j;
for (j = 0; j < N; ++j) {
switch (C) { // general unswitching.
default: P[i+j] = 0; break;
case 1: Q[i+j] = 0; break;
case 3: P[i+j] = Q[i+j]; break;
case 2: break; // TRIVIAL UNSWITCH on C==2
}
}
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26223 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86Subtarget.cpp')
0 files changed, 0 insertions, 0 deletions