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

Side by Side Diff: test/CodeGen/JS/simd-loadstore.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: llc < %s | FileCheck %s 1 ; RUN: llc < %s | FileCheck %s
2 2
3 target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64 :64:64-p:32:32:32-v128:32:128-n32-S128" 3 target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64 :64:64-p:32:32:32-v128:32:128-n32-S128"
4 target triple = "asmjs-unknown-emscripten" 4 target triple = "asmjs-unknown-emscripten"
5 5
6 ; CHECK: function _fx1($p) { 6 ; CHECK: function _fx1($p) {
7 ; CHECK: $p = $p|0; 7 ; CHECK: $p = $p|0;
8 ; CHECK: var $q = 0, $s = SIMD_float32x4(0,0,0,0), $t = SIMD_float32x4(0,0,0,0) 8 ; CHECK: var $q = 0, $s = SIMD_float32x4(0,0,0,0), $t = SIMD_float32x4(0,0,0,0)
9 ; CHECK: $t = SIMD_float32x4_loadX(HEAPU8, $p); 9 ; CHECK: $t = SIMD_float32x4_loadX(HEAPU8, $p);
10 ; CHECK: $s = SIMD_float32x4_add($t,SIMD_float32x4(Math_fround(+0.5),Math_froun d(+0),Math_fround(+0),Math_fround(+0))); 10 ; CHECK: $s = SIMD_float32x4_add($t,SIMD_float32x4(Math_fround(+0.5),Math_froun d(+0),Math_fround(+0),Math_fround(+0)));
11 ; CHECK: $q = $p;SIMD_float32x4_storeX(HEAPU8, $q, $s); 11 ; CHECK: $q = $p;SIMD_float32x4_storeX(HEAPU8, $q, $s);
12 ; CHECK: return; 12 ; CHECK: return;
13 ; CHECK: } 13 ; CHECK: }
14 define void @fx1(i8* %p) { 14 define void @fx1(i8* %p) {
15 %q = bitcast i8* %p to <1 x float>* 15 %q = bitcast i8* %p to <1 x float>*
16 %t = load <1 x float>* %q 16 %t = load <1 x float>, <1 x float>* %q
17 %s = fadd <1 x float> %t, <float 0.5> 17 %s = fadd <1 x float> %t, <float 0.5>
18 store <1 x float> %s, <1 x float>* %q 18 store <1 x float> %s, <1 x float>* %q
19 ret void 19 ret void
20 } 20 }
21 21
22 ; CHECK: function _fx2($p) { 22 ; CHECK: function _fx2($p) {
23 ; CHECK: $p = $p|0; 23 ; CHECK: $p = $p|0;
24 ; CHECK: var $q = 0, $s = SIMD_float32x4(0,0,0,0), $t = SIMD_float32x4(0,0,0,0) 24 ; CHECK: var $q = 0, $s = SIMD_float32x4(0,0,0,0), $t = SIMD_float32x4(0,0,0,0)
25 ; CHECK: $t = SIMD_float32x4_loadXY(HEAPU8, $p); 25 ; CHECK: $t = SIMD_float32x4_loadXY(HEAPU8, $p);
26 ; CHECK: $s = SIMD_float32x4_add($t,SIMD_float32x4(Math_fround(+3.5),Math_froun d(+7.5),Math_fround(+0),Math_fround(+0))); 26 ; CHECK: $s = SIMD_float32x4_add($t,SIMD_float32x4(Math_fround(+3.5),Math_froun d(+7.5),Math_fround(+0),Math_fround(+0)));
27 ; CHECK: $q = $p;SIMD_float32x4_storeXY(HEAPU8, $q, $s); 27 ; CHECK: $q = $p;SIMD_float32x4_storeXY(HEAPU8, $q, $s);
28 ; CHECK: return; 28 ; CHECK: return;
29 ; CHECK: } 29 ; CHECK: }
30 define void @fx2(i8* %p) { 30 define void @fx2(i8* %p) {
31 %q = bitcast i8* %p to <2 x float>* 31 %q = bitcast i8* %p to <2 x float>*
32 %t = load <2 x float>* %q 32 %t = load <2 x float>, <2 x float>* %q
33 %s = fadd <2 x float> %t, <float 3.5, float 7.5> 33 %s = fadd <2 x float> %t, <float 3.5, float 7.5>
34 store <2 x float> %s, <2 x float>* %q 34 store <2 x float> %s, <2 x float>* %q
35 ret void 35 ret void
36 } 36 }
37 37
38 ; CHECK: function _fx3($p) { 38 ; CHECK: function _fx3($p) {
39 ; CHECK: $p = $p|0; 39 ; CHECK: $p = $p|0;
40 ; CHECK: var $q = 0, $s = SIMD_float32x4(0,0,0,0), $t = SIMD_float32x4(0,0,0,0) 40 ; CHECK: var $q = 0, $s = SIMD_float32x4(0,0,0,0), $t = SIMD_float32x4(0,0,0,0)
41 ; CHECK: $t = SIMD_float32x4_loadXYZ(HEAPU8, $p); 41 ; CHECK: $t = SIMD_float32x4_loadXYZ(HEAPU8, $p);
42 ; CHECK: $s = SIMD_float32x4_add($t,SIMD_float32x4(Math_fround(+1.5),Math_froun d(+4.5),Math_fround(+6.5),Math_fround(+0))); 42 ; CHECK: $s = SIMD_float32x4_add($t,SIMD_float32x4(Math_fround(+1.5),Math_froun d(+4.5),Math_fround(+6.5),Math_fround(+0)));
43 ; CHECK: $q = $p;SIMD_float32x4_storeXYZ(HEAPU8, $q, $s); 43 ; CHECK: $q = $p;SIMD_float32x4_storeXYZ(HEAPU8, $q, $s);
44 ; CHECK: return; 44 ; CHECK: return;
45 ; CHECK: } 45 ; CHECK: }
46 define void @fx3(i8* %p) { 46 define void @fx3(i8* %p) {
47 %q = bitcast i8* %p to <3 x float>* 47 %q = bitcast i8* %p to <3 x float>*
48 %t = load <3 x float>* %q 48 %t = load <3 x float>, <3 x float>* %q
49 %s = fadd <3 x float> %t, <float 1.5, float 4.5, float 6.5> 49 %s = fadd <3 x float> %t, <float 1.5, float 4.5, float 6.5>
50 store <3 x float> %s, <3 x float>* %q 50 store <3 x float> %s, <3 x float>* %q
51 ret void 51 ret void
52 } 52 }
53 53
54 ; CHECK: function _fx4($p) { 54 ; CHECK: function _fx4($p) {
55 ; CHECK: $p = $p|0; 55 ; CHECK: $p = $p|0;
56 ; CHECK: var $q = 0, $s = SIMD_float32x4(0,0,0,0), $t = SIMD_float32x4(0,0,0,0) 56 ; CHECK: var $q = 0, $s = SIMD_float32x4(0,0,0,0), $t = SIMD_float32x4(0,0,0,0)
57 ; CHECK: $t = SIMD_float32x4_load(HEAPU8, $p); 57 ; CHECK: $t = SIMD_float32x4_load(HEAPU8, $p);
58 ; CHECK: $s = SIMD_float32x4_add($t,SIMD_float32x4(Math_fround(+9.5),Math_froun d(+5.5),Math_fround(+1.5),Math_fround(+-3.5))); 58 ; CHECK: $s = SIMD_float32x4_add($t,SIMD_float32x4(Math_fround(+9.5),Math_froun d(+5.5),Math_fround(+1.5),Math_fround(+-3.5)));
59 ; CHECK: $q = $p;SIMD_float32x4_store(HEAPU8, $q, $s); 59 ; CHECK: $q = $p;SIMD_float32x4_store(HEAPU8, $q, $s);
60 ; CHECK: return; 60 ; CHECK: return;
61 ; CHECK: } 61 ; CHECK: }
62 define void @fx4(i8* %p) { 62 define void @fx4(i8* %p) {
63 %q = bitcast i8* %p to <4 x float>* 63 %q = bitcast i8* %p to <4 x float>*
64 %t = load <4 x float>* %q 64 %t = load <4 x float>, <4 x float>* %q
65 %s = fadd <4 x float> %t, <float 9.5, float 5.5, float 1.5, float -3.5> 65 %s = fadd <4 x float> %t, <float 9.5, float 5.5, float 1.5, float -3.5>
66 store <4 x float> %s, <4 x float>* %q 66 store <4 x float> %s, <4 x float>* %q
67 ret void 67 ret void
68 } 68 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698