1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr9 < %s | FileCheck %s
4 define fp128 @f128_minimum(fp128 %a, fp128 %b) {
5 ; CHECK-LABEL: f128_minimum:
6 ; CHECK: # %bb.0: # %entry
7 ; CHECK-NEXT: xscmpuqp 0, 2, 3
9 ; CHECK-NEXT: bge 0, .LBB0_8
10 ; CHECK-NEXT: # %bb.1: # %entry
11 ; CHECK-NEXT: bun 0, .LBB0_9
12 ; CHECK-NEXT: .LBB0_2: # %entry
13 ; CHECK-NEXT: xststdcqp 0, 2, 4
14 ; CHECK-NEXT: bc 4, 2, .LBB0_10
15 ; CHECK-NEXT: .LBB0_3: # %entry
16 ; CHECK-NEXT: xststdcqp 0, 3, 4
17 ; CHECK-NEXT: bc 12, 2, .LBB0_5
18 ; CHECK-NEXT: .LBB0_4: # %entry
19 ; CHECK-NEXT: vmr 3, 2
20 ; CHECK-NEXT: .LBB0_5: # %entry
21 ; CHECK-NEXT: addis 3, 2, .LCPI0_1@toc@ha
22 ; CHECK-NEXT: addi 3, 3, .LCPI0_1@toc@l
23 ; CHECK-NEXT: lxv 34, 0(3)
24 ; CHECK-NEXT: xscmpuqp 0, 4, 2
25 ; CHECK-NEXT: beq 0, .LBB0_7
26 ; CHECK-NEXT: # %bb.6: # %entry
27 ; CHECK-NEXT: vmr 3, 4
28 ; CHECK-NEXT: .LBB0_7: # %entry
29 ; CHECK-NEXT: vmr 2, 3
31 ; CHECK-NEXT: .LBB0_8: # %entry
32 ; CHECK-NEXT: vmr 4, 3
33 ; CHECK-NEXT: bnu 0, .LBB0_2
34 ; CHECK-NEXT: .LBB0_9:
35 ; CHECK-NEXT: addis 3, 2, .LCPI0_0@toc@ha
36 ; CHECK-NEXT: addi 3, 3, .LCPI0_0@toc@l
37 ; CHECK-NEXT: lxv 36, 0(3)
38 ; CHECK-NEXT: xststdcqp 0, 2, 4
39 ; CHECK-NEXT: bc 12, 2, .LBB0_3
40 ; CHECK-NEXT: .LBB0_10: # %entry
41 ; CHECK-NEXT: vmr 2, 4
42 ; CHECK-NEXT: xststdcqp 0, 3, 4
43 ; CHECK-NEXT: bc 4, 2, .LBB0_4
44 ; CHECK-NEXT: b .LBB0_5
46 %m = call fp128 @llvm.minimum.f128(fp128 %a, fp128 %b)
50 define fp128 @f128_maximum(fp128 %a, fp128 %b) {
51 ; CHECK-LABEL: f128_maximum:
52 ; CHECK: # %bb.0: # %entry
53 ; CHECK-NEXT: xscmpuqp 0, 2, 3
54 ; CHECK-NEXT: vmr 4, 2
55 ; CHECK-NEXT: ble 0, .LBB1_8
56 ; CHECK-NEXT: # %bb.1: # %entry
57 ; CHECK-NEXT: bun 0, .LBB1_9
58 ; CHECK-NEXT: .LBB1_2: # %entry
59 ; CHECK-NEXT: xststdcqp 0, 2, 8
60 ; CHECK-NEXT: bc 4, 2, .LBB1_10
61 ; CHECK-NEXT: .LBB1_3: # %entry
62 ; CHECK-NEXT: xststdcqp 0, 3, 8
63 ; CHECK-NEXT: bc 12, 2, .LBB1_5
64 ; CHECK-NEXT: .LBB1_4: # %entry
65 ; CHECK-NEXT: vmr 3, 2
66 ; CHECK-NEXT: .LBB1_5: # %entry
67 ; CHECK-NEXT: addis 3, 2, .LCPI1_1@toc@ha
68 ; CHECK-NEXT: addi 3, 3, .LCPI1_1@toc@l
69 ; CHECK-NEXT: lxv 34, 0(3)
70 ; CHECK-NEXT: xscmpuqp 0, 4, 2
71 ; CHECK-NEXT: beq 0, .LBB1_7
72 ; CHECK-NEXT: # %bb.6: # %entry
73 ; CHECK-NEXT: vmr 3, 4
74 ; CHECK-NEXT: .LBB1_7: # %entry
75 ; CHECK-NEXT: vmr 2, 3
77 ; CHECK-NEXT: .LBB1_8: # %entry
78 ; CHECK-NEXT: vmr 4, 3
79 ; CHECK-NEXT: bnu 0, .LBB1_2
80 ; CHECK-NEXT: .LBB1_9:
81 ; CHECK-NEXT: addis 3, 2, .LCPI1_0@toc@ha
82 ; CHECK-NEXT: addi 3, 3, .LCPI1_0@toc@l
83 ; CHECK-NEXT: lxv 36, 0(3)
84 ; CHECK-NEXT: xststdcqp 0, 2, 8
85 ; CHECK-NEXT: bc 12, 2, .LBB1_3
86 ; CHECK-NEXT: .LBB1_10: # %entry
87 ; CHECK-NEXT: vmr 2, 4
88 ; CHECK-NEXT: xststdcqp 0, 3, 8
89 ; CHECK-NEXT: bc 4, 2, .LBB1_4
90 ; CHECK-NEXT: b .LBB1_5
92 %m = call fp128 @llvm.maximum.f128(fp128 %a, fp128 %b)
96 declare fp128 @llvm.minimum.f128(fp128, fp128)
97 declare fp128 @llvm.maximum.f128(fp128, fp128)