Serious cleanups. Make the TOC match the text for the class hierarchy,
[oota-llvm.git] / test / Feature / packed_cmp.ll
1 ; This test checks to make sure that NE and EQ comparisons of
2 ; vector types work.
3 ; RUN: llvm-as < %s | llvm-dis > %t1.ll
4 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
5 ; RUN: diff %t1.ll %t2.ll
6 ; XFAIL: *
7
8 %ivec_type = type <4 x i8> 
9 %ivec1  = constant %ivec_type < i8 1, i8 1, i8 1, i8 1 >
10 %ivec2  = constant %ivec_type < i8 0, i8 0, i8 0, i8 0 >
11
12 %fvec_type = type <4 x float>
13 %fvec1 = constant %fvec_type <float 1.0, float 1.0, float 1.0, float 1.0>
14 %fvec2 = constant %fvec_type <float 0.0, float 0.0, float 0.0, float 0.0>
15
16 implementation   ; Functions:
17
18 define bool %ivectest1() {
19     %v1 = load %ivec_type* getelementptr(%ivec_type* %ivec1, i32 0)
20     %v2 = load %ivec_type* getelementptr(%ivec_type* %ivec2, i32 0)
21     %res = icmp ne %ivec_type %v1, %v2
22     ret bool %res
23 }
24
25 define bool %ivectest2() {
26     %v1 = load %ivec_type* getelementptr(%ivec_type* %ivec1, i32 0)
27     %v2 = load %ivec_type* getelementptr(%ivec_type* %ivec2, i32 0)
28     %res = icmp eq %ivec_type %v1, %v2
29     ret bool %res
30 }
31
32 define bool %fvectest1() {
33     %v1 = load %fvec_type* %fvec1
34     %v2 = load %fvec_type* %fvec2
35     %res = fcmp one %fvec_type %v1, %v2
36     ret bool %res
37 }
38
39 define bool %fvectest2() {
40     %v1 = load %fvec_type* %fvec1
41     %v2 = load %fvec_type* %fvec2
42     %res = fcmp oeq %fvec_type %v1, %v2
43     ret bool %res
44 }
45
46 define bool %fvectest3() {
47     %v1 = load %fvec_type* %fvec1
48     %v2 = load %fvec_type* %fvec2
49     %res = fcmp une %fvec_type %v1, %v2
50     ret bool %res
51 }
52
53 define bool %fvectest4() {
54     %v1 = load %fvec_type* %fvec1
55     %v2 = load %fvec_type* %fvec2
56     %res = fcmp ueq %fvec_type %v1, %v2
57     ret bool %res
58 }