diff options
| author | Rong Xu <xur@google.com> | 2017-11-14 21:44:09 +0000 |
|---|---|---|
| committer | Rong Xu <xur@google.com> | 2017-11-14 21:44:09 +0000 |
| commit | 3573d8da3657ac62b4ebe2c385c5e6aad99f1fe6 (patch) | |
| tree | b4f9f963bfafc0d42918189ba81ac965838218e9 /llvm/test/CodeGen/SystemZ | |
| parent | 7007f07664dcb92bd9467d7d7cbbbc34cadcba65 (diff) | |
| download | bcm5719-llvm-3573d8da3657ac62b4ebe2c385c5e6aad99f1fe6.tar.gz bcm5719-llvm-3573d8da3657ac62b4ebe2c385c5e6aad99f1fe6.zip | |
[CodeGen] Peel off the dominant case in switch statement in lowering
This patch peels off the top case in switch statement into a branch if the
probability exceeds a threshold. This will help the branch prediction and
avoids the extra compares when lowering into chain of branches.
Differential Revision: http://reviews.llvm.org/D39262
llvm-svn: 318202
Diffstat (limited to 'llvm/test/CodeGen/SystemZ')
| -rw-r--r-- | llvm/test/CodeGen/SystemZ/loop-03.ll | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/SystemZ/loop-03.ll b/llvm/test/CodeGen/SystemZ/loop-03.ll index b95e1ae2dcc..79bd23e6274 100644 --- a/llvm/test/CodeGen/SystemZ/loop-03.ll +++ b/llvm/test/CodeGen/SystemZ/loop-03.ll @@ -3,7 +3,7 @@ ; FP128 registers part of the callee saved registers list in order to avoid ; spilling / reloading. ; -; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s +; RUN: llc -switch-peel-threshold=101 < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s %0 = type { %0*, %0*, %0*, i32, %1*, i64, i64, i64, i64, i64, i64, %2, %5, %7 } %1 = type { i32, i32, i32 (%1*, i64, i32)*, i32 (%1*, i64, i64, i32, i8**)*, i32 (%1*, i64, i64, i64, i32)*, i32 (%1*)*, void (i8*)*, i8*, i8* } |

