diff options
author | Cong Hou <congh@google.com> | 2015-08-26 23:15:32 +0000 |
---|---|---|
committer | Cong Hou <congh@google.com> | 2015-08-26 23:15:32 +0000 |
commit | 03127700d5eddf373eced331c4a8a5f07bd0adfe (patch) | |
tree | fe1d8c7888fb450bae52fb8db33878dab9f0980b /llvm/test/CodeGen/Mips/nacl-align.ll | |
parent | ca22b869dc3ed2a3f535da31062735671880a5f8 (diff) | |
download | bcm5719-llvm-03127700d5eddf373eced331c4a8a5f07bd0adfe.tar.gz bcm5719-llvm-03127700d5eddf373eced331c4a8a5f07bd0adfe.zip |
Assign weights to edges to jump table / bit test header when lowering switch statement.
Currently, when lowering switch statement and a new basic block is built for jump table / bit test header, the edge to this new block is not assigned with a correct weight. This patch collects the edge weight from all its successors and assign this sum of weights to the edge (and also the other fall-through edge). Test cases are adjusted accordingly.
Differential Revision: http://reviews.llvm.org/D12166#fae6eca7
llvm-svn: 246104
Diffstat (limited to 'llvm/test/CodeGen/Mips/nacl-align.ll')
-rw-r--r-- | llvm/test/CodeGen/Mips/nacl-align.ll | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/Mips/nacl-align.ll b/llvm/test/CodeGen/Mips/nacl-align.ll index ec8f3f06afd..8191c7dec6f 100644 --- a/llvm/test/CodeGen/Mips/nacl-align.ll +++ b/llvm/test/CodeGen/Mips/nacl-align.ll @@ -44,18 +44,17 @@ default: ; CHECK-NEXT: ${{BB[0-9]+_[0-9]+}}: ; CHECK-NEXT: jr $ra ; CHECK-NEXT: addiu $2, $zero, 111 -; CHECK-NEXT: .align 4 ; CHECK-NEXT: ${{BB[0-9]+_[0-9]+}}: ; CHECK-NEXT: jr $ra -; CHECK-NEXT: addiu $2, $zero, 222 +; CHECK-NEXT: addiu $2, $zero, 555 ; CHECK-NEXT: .align 4 ; CHECK-NEXT: ${{BB[0-9]+_[0-9]+}}: ; CHECK-NEXT: jr $ra -; CHECK-NEXT: addiu $2, $zero, 333 +; CHECK-NEXT: addiu $2, $zero, 222 ; CHECK-NEXT: .align 4 ; CHECK-NEXT: ${{BB[0-9]+_[0-9]+}}: ; CHECK-NEXT: jr $ra -; CHECK-NEXT: addiu $2, $zero, 444 +; CHECK-NEXT: addiu $2, $zero, 333 } |