1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2 ; RUN: llc -mtriple=ppc64le-unknown-unknown %s -o - | FileCheck %s
4 define i8 @ucmp_8_8(i8 zeroext %x, i8 zeroext %y) nounwind {
5 ; CHECK-LABEL: ucmp_8_8:
7 ; CHECK-NEXT: cmplw 3, 4
8 ; CHECK-NEXT: sub 5, 4, 3
10 ; CHECK-NEXT: rldicl 5, 5, 1, 63
11 ; CHECK-NEXT: rldic 3, 3, 0, 32
12 ; CHECK-NEXT: isellt 3, 3, 5
14 %1 = call i8 @llvm.ucmp(i8 %x, i8 %y)
18 define i8 @ucmp_8_16(i16 zeroext %x, i16 zeroext %y) nounwind {
19 ; CHECK-LABEL: ucmp_8_16:
21 ; CHECK-NEXT: cmplw 3, 4
22 ; CHECK-NEXT: sub 5, 4, 3
23 ; CHECK-NEXT: li 3, -1
24 ; CHECK-NEXT: rldicl 5, 5, 1, 63
25 ; CHECK-NEXT: rldic 3, 3, 0, 32
26 ; CHECK-NEXT: isellt 3, 3, 5
28 %1 = call i8 @llvm.ucmp(i16 %x, i16 %y)
32 define i8 @ucmp_8_32(i32 %x, i32 %y) nounwind {
33 ; CHECK-LABEL: ucmp_8_32:
35 ; CHECK-NEXT: clrldi 5, 4, 32
36 ; CHECK-NEXT: clrldi 6, 3, 32
37 ; CHECK-NEXT: sub 5, 5, 6
38 ; CHECK-NEXT: cmplw 3, 4
39 ; CHECK-NEXT: li 3, -1
40 ; CHECK-NEXT: rldic 3, 3, 0, 32
41 ; CHECK-NEXT: rldicl 5, 5, 1, 63
42 ; CHECK-NEXT: isellt 3, 3, 5
44 %1 = call i8 @llvm.ucmp(i32 %x, i32 %y)
48 define i8 @ucmp_8_64(i64 %x, i64 %y) nounwind {
49 ; CHECK-LABEL: ucmp_8_64:
51 ; CHECK-NEXT: cmpld 3, 4
52 ; CHECK-NEXT: subc 3, 4, 3
53 ; CHECK-NEXT: subfe 3, 4, 4
54 ; CHECK-NEXT: li 4, -1
55 ; CHECK-NEXT: neg 3, 3
56 ; CHECK-NEXT: isellt 3, 4, 3
58 %1 = call i8 @llvm.ucmp(i64 %x, i64 %y)
62 define i8 @ucmp_8_128(i128 %x, i128 %y) nounwind {
63 ; CHECK-LABEL: ucmp_8_128:
65 ; CHECK-NEXT: cmpld 4, 6
66 ; CHECK-NEXT: cmpld 1, 3, 5
68 ; CHECK-NEXT: li 4, -1
69 ; CHECK-NEXT: crandc 20, 1, 2
70 ; CHECK-NEXT: crand 21, 2, 5
71 ; CHECK-NEXT: crnor 20, 21, 20
72 ; CHECK-NEXT: crand 21, 2, 4
73 ; CHECK-NEXT: isel 3, 0, 3, 20
74 ; CHECK-NEXT: crandc 20, 0, 2
75 ; CHECK-NEXT: cror 20, 21, 20
76 ; CHECK-NEXT: isel 3, 4, 3, 20
78 %1 = call i8 @llvm.ucmp(i128 %x, i128 %y)
82 define i32 @ucmp_32_32(i32 %x, i32 %y) nounwind {
83 ; CHECK-LABEL: ucmp_32_32:
85 ; CHECK-NEXT: clrldi 5, 4, 32
86 ; CHECK-NEXT: clrldi 6, 3, 32
87 ; CHECK-NEXT: sub 5, 5, 6
88 ; CHECK-NEXT: cmplw 3, 4
89 ; CHECK-NEXT: li 3, -1
90 ; CHECK-NEXT: rldic 3, 3, 0, 32
91 ; CHECK-NEXT: rldicl 5, 5, 1, 63
92 ; CHECK-NEXT: isellt 3, 3, 5
94 %1 = call i32 @llvm.ucmp(i32 %x, i32 %y)
98 define i32 @ucmp_32_64(i64 %x, i64 %y) nounwind {
99 ; CHECK-LABEL: ucmp_32_64:
101 ; CHECK-NEXT: cmpld 3, 4
102 ; CHECK-NEXT: subc 3, 4, 3
103 ; CHECK-NEXT: subfe 3, 4, 4
104 ; CHECK-NEXT: li 4, -1
105 ; CHECK-NEXT: neg 3, 3
106 ; CHECK-NEXT: isellt 3, 4, 3
108 %1 = call i32 @llvm.ucmp(i64 %x, i64 %y)
112 define i64 @ucmp_64_64(i64 %x, i64 %y) nounwind {
113 ; CHECK-LABEL: ucmp_64_64:
115 ; CHECK-NEXT: subc 5, 4, 3
116 ; CHECK-NEXT: cmpld 3, 4
117 ; CHECK-NEXT: li 3, -1
118 ; CHECK-NEXT: subfe 5, 4, 4
119 ; CHECK-NEXT: neg 5, 5
120 ; CHECK-NEXT: isellt 3, 3, 5
122 %1 = call i64 @llvm.ucmp(i64 %x, i64 %y)