1; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-- \
2; RUN:   -mcpu=pwr10 -ppc-asm-full-reg-names < %s | FileCheck %s
3; RUN: llc -verify-machineinstrs -target-abi=elfv2 -mtriple=powerpc64-- \
4; RUN:   -mcpu=pwr10 -ppc-asm-full-reg-names < %s | FileCheck %s
5
6 define float @FloatConstantPool() {
7; CHECK-LABEL: FloatConstantPool:
8; CHECK:       # %bb.0: # %entry
9; CHECK-NEXT:    plfs f1, .LCPI0_0@PCREL(0), 1
10entry:
11  ret float 0x380FFFF840000000
12}
13
14 define double @DoubleConstantPool() {
15; CHECK-LABEL: DoubleConstantPool:
16; CHECK:       # %bb.0: # %entry
17; CHECK-NEXT:    plfd f1, .LCPI1_0@PCREL(0), 1
18entry:
19  ret double 2.225070e-308
20}
21
22 define ppc_fp128 @LongDoubleConstantPool() {
23; CHECK-LABEL: LongDoubleConstantPool:
24; CHECK:       # %bb.0: # %entry
25; CHECK-NEXT:    plfd f1, .LCPI2_0@PCREL(0), 1
26; CHECK-NEXT:    plfd f2, .LCPI2_1@PCREL(0), 1
27entry:
28  ret ppc_fp128 0xM03600000DBA876CC800D16974FD9D27B
29}
30
31 define fp128 @__Float128ConstantPool() {
32; CHECK-LABEL: __Float128ConstantPool:
33; CHECK:       # %bb.0: # %entry
34; CHECK-NEXT:    plxv vs34, .LCPI3_0@PCREL(0), 1
35entry:
36  ret fp128 0xL00000000000000003C00FFFFC5D02B3A
37}
38
39 define <16 x i8> @VectorCharConstantPool() {
40; CHECK-LABEL: VectorCharConstantPool:
41; CHECK:       # %bb.0: # %entry
42; CHECK-NEXT:    plxv vs34, .LCPI4_0@PCREL(0), 1
43entry:
44  ret <16 x i8> <i8 -128, i8 -127, i8 -126, i8 -125, i8 -124, i8 -123, i8 -122, i8 -121, i8 -120, i8 -119, i8 -118, i8 -117, i8 -116, i8 -115, i8 -114, i8 -113>
45}
46
47 define <8 x i16> @VectorShortConstantPool() {
48; CHECK-LABEL: VectorShortConstantPool:
49; CHECK:       # %bb.0: # %entry
50; CHECK-NEXT:    plxv vs34, .LCPI5_0@PCREL(0), 1
51entry:
52  ret <8 x i16> <i16 -32768, i16 -32767, i16 -32766, i16 -32765, i16 -32764, i16 -32763, i16 -32762, i16 -32761>
53}
54
55 define <4 x i32> @VectorIntConstantPool() {
56; CHECK-LABEL: VectorIntConstantPool:
57; CHECK:       # %bb.0: # %entry
58; CHECK-NEXT:    plxv vs34, .LCPI6_0@PCREL(0), 1
59entry:
60  ret <4 x i32> <i32 -2147483648, i32 -2147483647, i32 -2147483646, i32 -2147483645>
61}
62
63 define <2 x i64> @VectorLongLongConstantPool() {
64; CHECK-LABEL: VectorLongLongConstantPool:
65; CHECK:       # %bb.0: # %entry
66; CHECK-NEXT:    plxv vs34, .LCPI7_0@PCREL(0), 1
67entry:
68  ret <2 x i64> <i64 -9223372036854775808, i64 -9223372036854775807>
69}
70
71 define <1 x i128> @VectorInt128ConstantPool() {
72; CHECK-LABEL: VectorInt128ConstantPool:
73; CHECK:       # %bb.0: # %entry
74; CHECK-NEXT:    plxv vs34, .LCPI8_0@PCREL(0), 1
75entry:
76  ret <1 x i128> <i128 -27670116110564327424>
77}
78
79 define <4 x float> @VectorFloatConstantPool() {
80; CHECK-LABEL: VectorFloatConstantPool:
81; CHECK:       # %bb.0: # %entry
82; CHECK-NEXT:    plxv vs34, .LCPI9_0@PCREL(0), 1
83entry:
84  ret <4 x float> <float 0x380FFFF840000000, float 0x380FFF57C0000000, float 0x3843FFFB20000000, float 0x3843FF96C0000000>
85}
86
87 define <2 x double> @VectorDoubleConstantPool() {
88; CHECK-LABEL: VectorDoubleConstantPool:
89; CHECK:       # %bb.0: # %entry
90; CHECK-NEXT:    plxv vs34, .LCPI10_0@PCREL(0), 1
91entry:
92  ret <2 x double> <double 2.225070e-308, double 2.225000e-308>
93}
94