| OLD | NEW |
| (Empty) |
| 1 ; RUN: llc < %s | FileCheck %s | |
| 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" | |
| 4 target triple = "asmjs-unknown-emscripten" | |
| 5 | |
| 6 ; CHECK: function _fx1($p) { | |
| 7 ; CHECK: $p = $p|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); | |
| 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); | |
| 12 ; CHECK: return; | |
| 13 ; CHECK: } | |
| 14 define void @fx1(i8* %p) { | |
| 15 %q = bitcast i8* %p to <1 x float>* | |
| 16 %t = load <1 x float>, <1 x float>* %q | |
| 17 %s = fadd <1 x float> %t, <float 0.5> | |
| 18 store <1 x float> %s, <1 x float>* %q | |
| 19 ret void | |
| 20 } | |
| 21 | |
| 22 ; CHECK: function _fx2($p) { | |
| 23 ; CHECK: $p = $p|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); | |
| 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); | |
| 28 ; CHECK: return; | |
| 29 ; CHECK: } | |
| 30 define void @fx2(i8* %p) { | |
| 31 %q = bitcast i8* %p to <2 x float>* | |
| 32 %t = load <2 x float>, <2 x float>* %q | |
| 33 %s = fadd <2 x float> %t, <float 3.5, float 7.5> | |
| 34 store <2 x float> %s, <2 x float>* %q | |
| 35 ret void | |
| 36 } | |
| 37 | |
| 38 ; CHECK: function _fx3($p) { | |
| 39 ; CHECK: $p = $p|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); | |
| 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); | |
| 44 ; CHECK: return; | |
| 45 ; CHECK: } | |
| 46 define void @fx3(i8* %p) { | |
| 47 %q = bitcast i8* %p to <3 x float>* | |
| 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> | |
| 50 store <3 x float> %s, <3 x float>* %q | |
| 51 ret void | |
| 52 } | |
| 53 | |
| 54 ; CHECK: function _fx4($p) { | |
| 55 ; CHECK: $p = $p|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); | |
| 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); | |
| 60 ; CHECK: return; | |
| 61 ; CHECK: } | |
| 62 define void @fx4(i8* %p) { | |
| 63 %q = bitcast i8* %p to <4 x float>* | |
| 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> | |
| 66 store <4 x float> %s, <4 x float>* %q | |
| 67 ret void | |
| 68 } | |
| OLD | NEW |