| OLD | NEW |
| 1 ; Test the the loop nest depth is correctly calculated for basic blocks. | 1 ; Test the the loop nest depth is correctly calculated for basic blocks. |
| 2 | 2 |
| 3 ; REQUIRES: allow_dump | 3 ; REQUIRES: allow_dump |
| 4 | 4 |
| 5 ; Single threaded so that the dumps used for checking happen in order | 5 ; Single threaded so that the dumps used for checking happen in order. |
| 6 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 --verbose=loop \ | 6 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 --verbose=loop \ |
| 7 ; RUN: --threads=0 | FileCheck %s | 7 ; RUN: -log=%t --threads=0 && FileCheck %s < %t |
| 8 | 8 |
| 9 define internal void @test_single_loop(i32 %a32) { | 9 define internal void @test_single_loop(i32 %a32) { |
| 10 entry: | 10 entry: |
| 11 %a = trunc i32 %a32 to i1 | 11 %a = trunc i32 %a32 to i1 |
| 12 br label %loop0 | 12 br label %loop0 |
| 13 | 13 |
| 14 loop0: ; <-+ | 14 loop0: ; <-+ |
| 15 br label %loop1 ; | | 15 br label %loop1 ; | |
| 16 loop1: ; | | 16 loop1: ; | |
| 17 br i1 %a, label %loop0, label %out ; --+ | 17 br i1 %a, label %loop0, label %out ; --+ |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 } | 297 } |
| 298 | 298 |
| 299 ; CHECK-LABEL: After loop nest depth analysis | 299 ; CHECK-LABEL: After loop nest depth analysis |
| 300 ; CHECK-NEXT: entry: | 300 ; CHECK-NEXT: entry: |
| 301 ; CHECK-NEXT: LoopNestDepth = 0 | 301 ; CHECK-NEXT: LoopNestDepth = 0 |
| 302 ; CHECK-NEXT: body: | 302 ; CHECK-NEXT: body: |
| 303 ; CHECK-NEXT: LoopNestDepth = 1 | 303 ; CHECK-NEXT: LoopNestDepth = 1 |
| 304 ; CHECK-NEXT: exit: | 304 ; CHECK-NEXT: exit: |
| 305 ; CHECK-NEXT: LoopNestDepth = 0 | 305 ; CHECK-NEXT: LoopNestDepth = 0 |
| 306 ; CHECK-LABEL: Before RMW | 306 ; CHECK-LABEL: Before RMW |
| OLD | NEW |