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

Side by Side Diff: test/Transforms/MinSFI/substitute-undefs.ll

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 9 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/Transforms/MinSFI/strip-tls.ll ('k') | test/Transforms/NaCl/add-pnacl-external-decls.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: opt %s -minsfi-substitute-undefs -S | FileCheck %s
2
3 target datalayout = "p:32:32:32"
4 target triple = "le32-unknown-nacl"
5
6 define i1 @test_undef_i1() {
7 ret i1 undef ; replaced with 0x0
8 }
9
10 ; CHECK-LABEL: define i1 @test_undef_i1() {
11 ; CHECK-NEXT: ret i1 false
12 ; CHECK-NEXT: }
13
14 define i8 @test_undef_i8() {
15 ret i8 undef ; replaced with 0xBE
16 }
17
18 ; CHECK-LABEL: define i8 @test_undef_i8() {
19 ; CHECK-NEXT: ret i8 -66
20 ; CHECK-NEXT: }
21
22 define i64 @test_undef_i64() {
23 ret i64 undef ; replaced with 0xBAADF00DCAFEBABE
24 }
25
26 ; CHECK-LABEL: define i64 @test_undef_i64() {
27 ; CHECK-NEXT: ret i64 -4995072469653079362
28 ; CHECK-NEXT: }
29
30 define <8 x i16> @test_undef_i16vec() {
31 ret <8 x i16> undef ; replace with a vector of 0xBABE
32 }
33
34 ; CHECK-LABEL: define <8 x i16> @test_undef_i16vec() {
35 ; CHECK-NEXT: ret <8 x i16> <i16 -17730, i16 -17730, i16 -17730, i16 -17730, i16 -17730, i16 -17730, i16 -17730, i16 -17730>
36 ; CHECK-NEXT: }
37
38 define float @test_undef_float() {
39 ret float undef ; replaced with pi
40 }
41
42 ; CHECK-LABEL: define float @test_undef_float() {
43 ; CHECK-NEXT: ret float 0x400921FB60000000
44 ; CHECK-NEXT: }
45
46 define double @test_undef_double() {
47 ret double undef ; replaced with pi
48 }
49
50 ; CHECK-LABEL: define double @test_undef_double() {
51 ; CHECK-NEXT: ret double 0x400921FB54442EEA
52 ; CHECK-NEXT: }
53
54 define <4 x float> @test_undef_floatvec() {
55 ret <4 x float> undef ; replaced with a vector of pi
56 }
57
58 ; CHECK-LABEL: define <4 x float> @test_undef_floatvec() {
59 ; CHECK-NEXT: ret <4 x float> <float 0x400921FB60000000, float 0x400921FB6000 0000, float 0x400921FB60000000, float 0x400921FB60000000>
60 ; CHECK-NEXT: }
61
62
63
64 declare void @foo(i32, float)
65
66 define void @test_more_operands() {
67 call void @foo(i32 undef, float undef)
68 ret void
69 }
70
71 ; CHECK-LABEL: define void @test_more_operands() {
72 ; CHECK-NEXT: call void @foo(i32 -889275714, float 0x400921FB60000000)
73 ; CHECK-NEXT: ret void
74 ; CHECK-NEXT: }
75
76 define void @test_more_basicblocks() {
77 entry:
78 br label %loop
79
80 loop:
81 %i = phi i16 [ undef, %entry ], [ %next, %loop ]
82 %next = add i16 %i, 1
83 br i1 undef, label %exit, label %loop
84
85 exit:
86 ret void
87 }
88
89 ; CHECK-LABEL: define void @test_more_basicblocks() {
90 ; CHECK-NEXT: entry:
91 ; CHECK-NEXT: br label %loop
92 ; CHECK: loop:
93 ; CHECK-NEXT: %i = phi i16 [ -17730, %entry ], [ %next, %loop ]
94 ; CHECK-NEXT: %next = add i16 %i, 1
95 ; CHECK-NEXT: br i1 false, label %exit
96 ; CHECK: exit:
97 ; CHECK-NEXT: ret void
98 ; CHECK-NEXT: }
OLDNEW
« no previous file with comments | « test/Transforms/MinSFI/strip-tls.ll ('k') | test/Transforms/NaCl/add-pnacl-external-decls.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698