3c9342a1542cd2352831a76a76d414e7702876a1
[oota-llvm.git] / test / CodeGen / CellSPU / and_ops_more.ll
1 ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s
2 ; RUN: grep and    %t1.s | count 10
3 ; RUN: not grep andc %t1.s
4 ; RUN: not grep andi %t1.s
5 ; RUN: grep andhi  %t1.s | count 5
6 ; RUN: grep andbi  %t1.s | count 1
7 ; XFAIL: *
8
9 ; This testcase is derived from test/CodeGen/CellSPU/and_ops.ll and
10 ; records the changes due to r50358. The and_sext8 function appears
11 ; to be improved by this change, while the andhi_i16 function appears
12 ; to be pessimized.
13
14 target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128"
15 target triple = "spu"
16
17 define i16 @andhi_i16(i16 signext  %in) signext  {
18         %tmp38 = and i16 %in, 37         ; <i16> [#uses=1]
19         ret i16 %tmp38
20 }
21
22 define i8 @and_sext8(i8 signext  %in) signext  {
23         ; ANDBI generated
24         %tmp38 = and i8 %in, 37
25         ret i8 %tmp38
26 }