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

Side by Side Diff: test/Transforms/NaCl/expand-small-arguments.ll

Issue 1151093004: Changes from 3.7 merge to files not in upstream (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Created 5 years, 7 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 ; RUN: opt %s -expand-small-arguments -S | FileCheck %s 1 ; RUN: opt %s -expand-small-arguments -S | FileCheck %s
2 2
3 @var = global i8 0 3 @var = global i8 0
4 4
5 5
6 define void @small_arg(i8 %val) { 6 define void @small_arg(i8 %val) {
7 store i8 %val, i8* @var 7 store i8 %val, i8* @var
8 ret void 8 ret void
9 } 9 }
10 ; CHECK: define void @small_arg(i32 %val) { 10 ; CHECK: define void @small_arg(i32 %val) {
11 ; CHECK-NEXT: %val.arg_trunc = trunc i32 %val to i8 11 ; CHECK-NEXT: %val.arg_trunc = trunc i32 %val to i8
12 ; CHECK-NEXT: store i8 %val.arg_trunc, i8* @var 12 ; CHECK-NEXT: store i8 %val.arg_trunc, i8* @var
13 13
14 14
15 define i8 @small_result() { 15 define i8 @small_result() {
16 %val = load i8* @var 16 %val = load i8, i8* @var
17 ret i8 %val 17 ret i8 %val
18 } 18 }
19 ; CHECK: define i32 @small_result() { 19 ; CHECK: define i32 @small_result() {
20 ; CHECK-NEXT: %val = load i8* @var 20 ; CHECK-NEXT: %val = load i8, i8* @var
21 ; CHECK-NEXT: %val.ret_ext = zext i8 %val to i32 21 ; CHECK-NEXT: %val.ret_ext = zext i8 %val to i32
22 ; CHECK-NEXT: ret i32 %val.ret_ext 22 ; CHECK-NEXT: ret i32 %val.ret_ext
23 23
24 define signext i8 @small_result_signext() { 24 define signext i8 @small_result_signext() {
25 %val = load i8* @var 25 %val = load i8, i8* @var
26 ret i8 %val 26 ret i8 %val
27 } 27 }
28 ; CHECK: define signext i32 @small_result_signext() { 28 ; CHECK: define signext i32 @small_result_signext() {
29 ; CHECK-NEXT: %val = load i8* @var 29 ; CHECK-NEXT: %val = load i8, i8* @var
30 ; CHECK-NEXT: %val.ret_ext = sext i8 %val to i32 30 ; CHECK-NEXT: %val.ret_ext = sext i8 %val to i32
31 ; CHECK-NEXT: ret i32 %val.ret_ext 31 ; CHECK-NEXT: ret i32 %val.ret_ext
32 32
33 33
34 define void @call_small_arg() { 34 define void @call_small_arg() {
35 call void @small_arg(i8 100) 35 call void @small_arg(i8 100)
36 ret void 36 ret void
37 } 37 }
38 ; CHECK: define void @call_small_arg() { 38 ; CHECK: define void @call_small_arg() {
39 ; CHECK-NEXT: %arg_ext = zext i8 100 to i32 39 ; CHECK-NEXT: %arg_ext = zext i8 100 to i32
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 ; CHECK: lpad: 208 ; CHECK: lpad:
209 ; CHECK-NEXT: %lp = landingpad { i8*, i32 } personality i8* null 209 ; CHECK-NEXT: %lp = landingpad { i8*, i32 } personality i8* null
210 ; CHECK-NEXT: cleanup 210 ; CHECK-NEXT: cleanup
211 ; CHECK-NEXT: %.ret_ext = zext i8 123 to i32 211 ; CHECK-NEXT: %.ret_ext = zext i8 123 to i32
212 ; CHECK-NEXT: ret i32 %.ret_ext 212 ; CHECK-NEXT: ret i32 %.ret_ext
213 213
214 214
215 ; CHECK: attributes [[NOUNWIND]] = { nounwind } 215 ; CHECK: attributes [[NOUNWIND]] = { nounwind }
216 ; CHECK: attributes [[NOINLINE]] = { noinline } 216 ; CHECK: attributes [[NOINLINE]] = { noinline }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698