Ignore:
Timestamp:
Aug 13, 2014, 5:40:12 PM (5 years ago)
Author:
linmengl
Message:

do exhaust test on insert/extract vector elt on both i2/i4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib_ir/gen/llc_func.pytemplate.ll

    r3997 r4001  
    1212{% endfor %}
    1313
    14 {% for i in [0, 1, 17] %}
    15 {% for x in range(0, 4) %}
    16 define <64 x i2> @insertelement_idx{{ i }}_elt{{ x }}(<64 x i2> %a) {
     14define <64 x i2> @insertelement_2(<64 x i2> %a, i8 %elt, i32 %idx) {
    1715entry:
    18   %c = insertelement <64 x i2> %a, i2 {{ x }}, i32 {{ i }}
     16  %e = trunc i8 %elt to i2
     17  %c = insertelement <64 x i2> %a, i2 %e, i32 %idx
    1918  ret <64 x i2> %c
    2019}
    2120
    22 {% endfor %}
    23 {% endfor %}
    24 
    25 {% for x in [0, 1, 17] %}
    26 define i8 @extractelement_idx{{ x }}(<64 x i2> %a) {
     21define i8 @extractelement_2(<64 x i2> %a, i32 %idx) {
    2722entry:
    28   %c = extractelement <64 x i2> %a, i32 {{ x }}
     23  %c = extractelement <64 x i2> %a, i32 %idx
    2924  %d = zext i2 %c to i8
    3025  ret i8 %d
    3126}
    32 {% endfor %}
    3327
    3428; v32i4 starts here
     
    4640{% endfor %}
    4741
     42define <32 x i4> @insertelement_4(<32 x i4> %a, i8 %elt, i32 %idx) {
     43entry:
     44  %e = trunc i8 %elt to i4
     45  %c = insertelement <32 x i4> %a, i4 %e, i32 %idx
     46  ret <32 x i4> %c
     47}
     48
     49define i8 @extractelement_4(<32 x i4> %a, i32 %idx) {
     50entry:
     51  %c = extractelement <32 x i4> %a, i32 %idx
     52  %d = zext i4 %c to i8
     53  ret i8 %d
     54}
     55
    4856; v16i8 starts here
    4957{% for name in FunctionNamesI8 %}
Note: See TracChangeset for help on using the changeset viewer.