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