Ignore:
Timestamp:
Aug 9, 2014, 6:18:29 PM (5 years ago)
Author:
linmengl
Message:

add testcases for insert_vector_element and extract_

File:
1 edited

Legend:

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

    r3977 r3985  
    1111}
    1212{% endfor %}
     13
     14{% for x in range(0, 4) %}
     15define <64 x i2> @insertelement_idx0_elt{{ x }}(<64 x i2> %a) {
     16entry:
     17  %c = insertelement <64 x i2> %a, i2 {{ x }}, i32 0
     18  ret <64 x i2> %c
     19}
     20
     21define <64 x i2> @insertelement_idx1_elt{{ x }}(<64 x i2> %a) {
     22entry:
     23  %c = insertelement <64 x i2> %a, i2 {{ x }}, i32 1
     24  ret <64 x i2> %c
     25}
     26
     27define <64 x i2> @insertelement_idx17_elt{{ x }}(<64 x i2> %a) {
     28entry:
     29  %c = insertelement <64 x i2> %a, i2 {{ x }}, i32 17
     30  ret <64 x i2> %c
     31}
     32
     33{% endfor %}
     34
     35{% for x in [0, 1, 17] %}
     36define i8 @extractelement_idx{{ x }}(<64 x i2> %a) {
     37entry:
     38  %c = extractelement <64 x i2> %a, i32 {{ x }}
     39  %d = zext i2 %c to i8
     40  ret i8 %d
     41}
     42{% endfor %}
Note: See TracChangeset for help on using the changeset viewer.