Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: tests_lit/llvm2ice_tests/licm.ll

Issue 2138443002: Subzero: Loop Invariant Code Motion (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Address comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceTimerTree.def ('k') | tests_lit/llvm2ice_tests/loop-nest-depth.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ; Tests if the licm flag successfully hoists the add from loop0 to entry
2
3 ; RUN: %p2i -i %s --filetype=obj --disassemble --target x8664 --args \
4 ; RUN: -O2 -licm | FileCheck --check-prefix ENABLE %s
5
6 ; RUN: %p2i -i %s --filetype=obj --disassemble --target x8664 --args \
7 ; RUN: -O2 | FileCheck --check-prefix NOENABLE %s
8
9 define internal void @dummy() {
10 entry:
11 ret void
12 }
13 define internal i32 @test_licm(i32 %a32, i32 %b, i32 %c) {
14 entry:
15 %a = trunc i32 %a32 to i1
16 br label %loop0
17 loop0: ; <-+
18 call void @dummy() ; |
19 %add1 = add i32 %b, %c ; |
20 br label %loop1 ; |
21 loop1: ; |
22 br i1 %a, label %loop0, label %out ; --+
23 out:
24 ret i32 %add1
25 }
26
27 ; CHECK-LABEL: test_licm
28
29 ; ENABLE: add
30 ; ENABLE: call
31
32 ; NOENABLE: call
33 ; NOENABLE-NEXT: mov
34 ; NOENABLE-NEXT: add
35
36 ; CHECK: ret
OLDNEW
« no previous file with comments | « src/IceTimerTree.def ('k') | tests_lit/llvm2ice_tests/loop-nest-depth.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698