Home | History | Annotate | Download | only in CellSPU
      1 ; RUN: llc < %s -march=cellspu | FileCheck %s 
      2 
      3 ; ModuleID = 'sext128.bc'
      4 target datalayout = "E-p:32:32:128-i1:8:128-i8:8:128-i16:16:128-i32:32:128-i64:32:128-f32:32:128-f64:64:128-v64:128:128-v128:128:128-a0:0:128-s0:128:128"
      5 target triple = "spu"
      6 
      7 define i128 @sext_i64_i128(i64 %a) {
      8 entry:
      9         %0 = sext i64 %a to i128
     10         ret i128 %0
     11 ; CHECK: 	long	269488144
     12 ; CHECK: 	long	269488144
     13 ; CHECK:	long	66051
     14 ; CHECK: 	long	67438087
     15 ; CHECK-NOT: rotqmbyi
     16 ; CHECK:	lqa
     17 ; CHECK: 	rotmai
     18 ; CHECK:	shufb
     19 }
     20 
     21 define i128 @sext_i32_i128(i32 %a) {
     22 entry:
     23         %0 = sext i32 %a to i128
     24         ret i128 %0
     25 ; CHECK: 	long	269488144
     26 ; CHECK: 	long	269488144
     27 ; CHECK: 	long	269488144
     28 ; CHECK:	long	66051
     29 ; CHECK-NOT: rotqmbyi
     30 ; CHECK:	lqa
     31 ; CHECK: 	rotmai
     32 ; CHECK:	shufb
     33 }
     34 
     35 define i128 @sext_i32_i128a(float %a) {
     36 entry:
     37   %0 = call i32 @myfunc(float %a)
     38   %1 = sext i32 %0 to i128
     39   ret i128 %1
     40 ; CHECK: 	long	269488144
     41 ; CHECK: 	long	269488144
     42 ; CHECK: 	long	269488144
     43 ; CHECK:	long	66051
     44 ; CHECK-NOT: rotqmbyi
     45 ; CHECK:	lqa
     46 ; CHECK: 	rotmai
     47 ; CHECK:	shufb
     48 }
     49 
     50 declare i32 @myfunc(float)
     51 
     52 define i128 @func1(i8 %u) {
     53 entry:
     54 ; CHECK: xsbh
     55 ; CHECK: xshw
     56 ; CHECK: rotmai
     57 ; CHECK: shufb
     58 ; CHECK: bi $lr
     59       %0 = sext i8 %u to i128
     60       ret i128 %0
     61 }
     62 
     63 define i128 @func2(i16 %u) {
     64 entry:
     65 ; CHECK: xshw
     66 ; CHECK: rotmai
     67 ; CHECK: shufb
     68 ; CHECK: bi $lr
     69       %0 = sext i16 %u to i128
     70       ret i128 %0
     71 }
     72