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

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

Issue 1387963002: Make sure that all globals are internal, except for "start" functions. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix new tests. Created 5 years, 2 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
OLDNEW
1 ; This tests that unreachable basic blocks are pruned from the CFG, so that 1 ; This tests that unreachable basic blocks are pruned from the CFG, so that
2 ; liveness analysis doesn't detect inconsistencies. 2 ; liveness analysis doesn't detect inconsistencies.
3 3
4 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 | FileCheck %s 4 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \
5 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 | FileCheck %s 5 ; RUN: -allow-externally-defined-symbols | FileCheck %s
6 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \
7 ; RUN: -allow-externally-defined-symbols | FileCheck %s
6 8
7 declare void @abort() 9 declare void @abort()
8 10
9 define i32 @unreachable_block() { 11 define internal i32 @unreachable_block() {
10 entry: 12 entry:
11 ; ret_val has no reaching uses and so its assignment may be 13 ; ret_val has no reaching uses and so its assignment may be
12 ; dead-code eliminated. 14 ; dead-code eliminated.
13 %ret_val = add i32 undef, undef 15 %ret_val = add i32 undef, undef
14 call void @abort() 16 call void @abort()
15 unreachable 17 unreachable
16 label: 18 label:
17 ; ret_val has no reaching definitions, causing an inconsistency in 19 ; ret_val has no reaching definitions, causing an inconsistency in
18 ; liveness analysis. 20 ; liveness analysis.
19 ret i32 %ret_val 21 ret i32 %ret_val
20 } 22 }
21 23
22 ; CHECK-LABEL: unreachable_block 24 ; CHECK-LABEL: unreachable_block
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/phi_invalid.test ('k') | tests_lit/llvm2ice_tests/randomize-pool-immediate-basic.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698