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

Side by Side Diff: test/NaCl/X86/ro-jumptable.ll

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 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 | « test/NaCl/X86/pnacl-hides-sandbox-x86-64.ll ('k') | test/NaCl/X86/stack-adjust.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 ; RUN: llc -mtriple=i386-unknown-nacl -filetype=asm %s -o - \
2 ; RUN: | FileCheck %s
3
4 declare i32 @bar(i32)
5
6 ; CHECK-LABEL: @foo
7 ; Check that the jump table for the switch goes in .rodata
8 ; CHECK: .section .rodata
9 ; CHECK: .long .LBB0
10 define void @foo(i32 %a) {
11 entry:
12 switch i32 %a, label %sw.epilog [
13 i32 3, label %sw.bb
14 i32 2, label %sw.bb1
15 i32 1, label %sw.bb3
16 i32 0, label %sw.bb5
17 ]
18
19 sw.bb: ; preds = %entry
20 %call = call i32 @bar(i32 1)
21 br label %sw.bb1
22
23 sw.bb1: ; preds = %entry, %sw.bb
24 %call2 = call i32 @bar(i32 2)
25 br label %sw.bb3
26
27 sw.bb3: ; preds = %entry, %sw.bb1
28 %call4 = call i32 @bar(i32 3)
29 br label %sw.bb5
30
31 sw.bb5: ; preds = %entry, %sw.bb3
32 %call6 = call i32 @bar(i32 4)
33 br label %sw.epilog
34
35 sw.epilog: ; preds = %sw.bb5, %entry
36 ret void
37 }
38
39
40 ; CHECK: .section .text.foo_linkonce,"axG",@progbits,foo_linkonce,comdat
41 ; CHECK: @foo_linkonce
42 ; Check that the jump table for the linkonce_odr function goes into a comdat
43 ; group uniqued like the function
44 ; CHECK: .section .rodata.foo_linkonce,"aG",@progbits,foo_linkonce,comdat
45 ; CHECK: .long .LBB1
46 define linkonce_odr void @foo_linkonce(i32 %a) {
47 entry:
48 switch i32 %a, label %sw.epilog [
49 i32 3, label %sw.bb
50 i32 2, label %sw.bb1
51 i32 1, label %sw.bb3
52 i32 0, label %sw.bb5
53 ]
54
55 sw.bb: ; preds = %entry
56 %call = call i32 @bar(i32 1)
57 br label %sw.bb1
58
59 sw.bb1: ; preds = %entry, %sw.bb
60 %call2 = call i32 @bar(i32 2)
61 br label %sw.bb3
62
63 sw.bb3: ; preds = %entry, %sw.bb1
64 %call4 = call i32 @bar(i32 3)
65 br label %sw.bb5
66
67 sw.bb5: ; preds = %entry, %sw.bb3
68 %call6 = call i32 @bar(i32 4)
69 br label %sw.epilog
70
71 sw.epilog: ; preds = %sw.bb5, %entry
72 ret void
73 }
74
OLDNEW
« no previous file with comments | « test/NaCl/X86/pnacl-hides-sandbox-x86-64.ll ('k') | test/NaCl/X86/stack-adjust.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698