Changeset 3920 for trunk/lib_ir/s2p.ll


Ignore:
Timestamp:
Jul 21, 2014, 7:00:26 PM (5 years ago)
Author:
linmengl
Message:

s2p_bytepack pure ir library works for sse2 now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib_ir/s2p.ll

    r3919 r3920  
    5959}
    6060
    61 define void @s2p_step(<4 x i32> %s0, <4 x i32> %s1, <4 x i32> %hi_mask, <8 x i16> %shift_mask, <4 x i32>* %p0, <4 x i32>* %p1) alwaysinline {
     61define void @s2p_step_ir(<4 x i32> %s0, <4 x i32> %s1, <4 x i32> %hi_mask, <8 x i16> %shift_mask, <4 x i32>* %p0, <4 x i32>* %p1) alwaysinline {
    6262entry:
    6363  %t0 = call <4 x i32> @packh_16(<4 x i32> %s0, <4 x i32> %s1)
     
    7575}
    7676
     77define <8 x i16> @const16_1() alwaysinline {
     78entry:
     79  ret <8 x i16> <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>
     80}
     81
     82define <8 x i16> @const16_2() alwaysinline {
     83entry:
     84  ret <8 x i16> <i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2>
     85}
     86
     87define <8 x i16> @const16_4() alwaysinline {
     88entry:
     89  ret <8 x i16> <i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4>
     90}
     91
     92define <4 x i32> @himask_2() alwaysinline {
     93entry:
     94  ret <4 x i32> <i32 -1431655766, i32 -1431655766, i32 -1431655766, i32 -1431655766>
     95}
     96
     97define <4 x i32> @himask_4() alwaysinline {
     98entry:
     99  ret <4 x i32> <i32 -858993460, i32 -858993460, i32 -858993460, i32 -858993460>
     100}
     101
     102define <4 x i32> @himask_8() alwaysinline {
     103entry:
     104  ret <4 x i32> <i32 -252645136, i32 -252645136, i32 -252645136, i32 -252645136>
     105}
     106
     107
     108;TODO: all the packh/l below need to swap aa and bb, because of the endings.
    77109;define <4 x i32> @packh_8(<4 x i32> %a, <4 x i32> %b) alwaysinline {
    78110;entry:
Note: See TracChangeset for help on using the changeset viewer.