Ignore:
Timestamp:
Aug 22, 2014, 11:36:12 AM (5 years ago)
Author:
linmengl
Message:

tests for i128 add/shift

File:
1 edited

Legend:

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

    r4005 r4076  
    7777}
    7878{% endfor %}
     79
     80
     81; long add/shift
     82define <4 x i32> @add_128(<4 x i32> %a, <4 x i32> %b) {
     83entry:
     84  %aa = bitcast <4 x i32> %a to i128
     85  %bb = bitcast <4 x i32> %b to i128
     86  %c = add i128 %aa, %bb
     87  %cc = bitcast i128 %c to <4 x i32>
     88  ret <4 x i32> %cc
     89}
     90
     91define <4 x i32> @sll_128(<4 x i32> %a, <4 x i32> %b) {
     92entry:
     93  %aa = bitcast <4 x i32> %a to i128
     94  %bb = bitcast <4 x i32> %b to i128
     95  %c = shl i128 %aa, %bb
     96  %cc = bitcast i128 %c to <4 x i32>
     97  ret <4 x i32> %cc
     98}
     99
Note: See TracChangeset for help on using the changeset viewer.