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

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

Issue 756543002: Subzero: Fix new issues after the LLVM 3.5 merge. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Also use `llvm-config --system-libs` Created 6 years 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 | « tests_lit/llvm2ice_tests/undef.ll ('k') | tests_lit/llvm2ice_tests/vector-arg.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; This tests the basic structure of the Unreachable instruction. 1 ; This tests the basic structure of the Unreachable instruction.
2 2
3 ; TODO(jvoung): fix extra "CALLTARGETS" run. The llvm-objdump symbolizer
4 ; doesn't know how to symbolize non-section-local functions.
5 ; The newer LLVM 3.6 one does work, but watch out for other bugs.
6
7 ; RUN: %p2i -i %s -a -O2 --verbose none \
8 ; RUN: | FileCheck --check-prefix=CALLTARGETS %s
9 ; RUN: %p2i -i %s -a -O2 --verbose none \ 3 ; RUN: %p2i -i %s -a -O2 --verbose none \
10 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ 4 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
11 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s 5 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
12 ; RUN: %p2i -i %s -a -Om1 --verbose none \ 6 ; RUN: %p2i -i %s -a -Om1 --verbose none \
13 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \ 7 ; RUN: | llvm-mc -triple=i686-none-nacl -filetype=obj \
14 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s 8 ; RUN: | llvm-objdump -d --symbolize -x86-asm-syntax=intel - | FileCheck %s
15 9
16 define internal i32 @divide(i32 %num, i32 %den) { 10 define internal i32 @divide(i32 %num, i32 %den) {
17 entry: 11 entry:
18 %cmp = icmp ne i32 %den, 0 12 %cmp = icmp ne i32 %den, 0
19 br i1 %cmp, label %return, label %abort 13 br i1 %cmp, label %return, label %abort
20 14
21 abort: ; preds = %entry 15 abort: ; preds = %entry
22 unreachable 16 unreachable
23 17
24 return: ; preds = %entry 18 return: ; preds = %entry
25 %div = sdiv i32 %num, %den 19 %div = sdiv i32 %num, %den
26 ret i32 %div 20 ret i32 %div
27 } 21 }
28 22
29 ; CHECK-LABEL: divide 23 ; CHECK-LABEL: divide
30 ; CALLTARGETS-LABEL: divide
31 ; CHECK: cmp 24 ; CHECK: cmp
32 ; CHECK: call -4 25 ; CHECK: call ice_unreachable
33 ; CALLTARGETS: .long ice_unreachable
34 ; CHECK: cdq 26 ; CHECK: cdq
35 ; CHECK: idiv 27 ; CHECK: idiv
36 ; CHECK: ret 28 ; CHECK: ret
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/undef.ll ('k') | tests_lit/llvm2ice_tests/vector-arg.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698