1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \ 3; RUN: -ppc-asm-full-reg-names -mcpu=pwr10 < %s | FileCheck %s 4; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \ 5; RUN: -ppc-asm-full-reg-names -mcpu=pwr10 < %s | FileCheck %s \ 6; RUN: --check-prefix=CHECK-NOPCREL 7; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \ 8; RUN: -mattr=-pcrelative-memops -ppc-asm-full-reg-names -mcpu=pwr10 < %s | \ 9; RUN: FileCheck %s --check-prefix=CHECK-NOPCREL 10; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \ 11; RUN: -ppc-asm-full-reg-names -target-abi=elfv2 -mcpu=pwr10 < %s | \ 12; RUN: FileCheck %s 13 14define dso_local <2 x double> @testDoubleToDoubleFail() local_unnamed_addr { 15; CHECK-LABEL: testDoubleToDoubleFail: 16; CHECK: # %bb.0: # %entry 17; CHECK-NEXT: plxv vs34, .LCPI0_0@PCREL(0), 1 18; CHECK-NEXT: blr 19; 20; CHECK-NOPCREL-LABEL: testDoubleToDoubleFail: 21; CHECK-NOPCREL: # %bb.0: # %entry 22; CHECK-NOPCREL-NEXT: addis r3, r2, .LCPI0_0@toc@ha 23; CHECK-NOPCREL-NEXT: addi r3, r3, .LCPI0_0@toc@l 24; CHECK-NOPCREL-NEXT: lxvx vs34, 0, r3 25; CHECK-NOPCREL-NEXT: blr 26 27entry: 28 ret <2 x double> <double 3.423300e+02, double 3.423300e+02> 29} 30 31define dso_local <2 x double> @testFloatDenormToDouble() local_unnamed_addr { 32; CHECK-LABEL: testFloatDenormToDouble: 33; CHECK: # %bb.0: # %entry 34; CHECK-NEXT: plxv vs34, .LCPI1_0@PCREL(0), 1 35; CHECK-NEXT: blr 36; 37; CHECK-NOPCREL-LABEL: testFloatDenormToDouble: 38; CHECK-NOPCREL: # %bb.0: # %entry 39; CHECK-NOPCREL-NEXT: addis r3, r2, .LCPI1_0@toc@ha 40; CHECK-NOPCREL-NEXT: addi r3, r3, .LCPI1_0@toc@l 41; CHECK-NOPCREL-NEXT: lxvx vs34, 0, r3 42; CHECK-NOPCREL-NEXT: blr 43 44entry: 45 ret <2 x double> <double 0x380B38FB80000000, double 0x380B38FB80000000> 46} 47 48define dso_local <2 x double> @testDoubleToDoubleNaNFail() local_unnamed_addr { 49; CHECK-LABEL: testDoubleToDoubleNaNFail: 50; CHECK: # %bb.0: # %entry 51; CHECK-NEXT: plxv vs34, .LCPI2_0@PCREL(0), 1 52; CHECK-NEXT: blr 53; 54; CHECK-NOPCREL-LABEL: testDoubleToDoubleNaNFail: 55; CHECK-NOPCREL: # %bb.0: # %entry 56; CHECK-NOPCREL-NEXT: addis r3, r2, .LCPI2_0@toc@ha 57; CHECK-NOPCREL-NEXT: addi r3, r3, .LCPI2_0@toc@l 58; CHECK-NOPCREL-NEXT: lxvx vs34, 0, r3 59; CHECK-NOPCREL-NEXT: blr 60 61entry: 62 ret <2 x double> <double 0xFFFFFFFFFFFFFFF0, double 0xFFFFFFFFFFFFFFF0> 63} 64 65define dso_local double @testDoubleNonRepresentableScalar() local_unnamed_addr { 66; CHECK-LABEL: testDoubleNonRepresentableScalar: 67; CHECK: # %bb.0: # %entry 68; CHECK-NEXT: plfd f1, .LCPI3_0@PCREL(0), 1 69; CHECK-NEXT: blr 70; 71; CHECK-NOPCREL-LABEL: testDoubleNonRepresentableScalar: 72; CHECK-NOPCREL: # %bb.0: # %entry 73; CHECK-NOPCREL-NEXT: addis r3, r2, .LCPI3_0@toc@ha 74; CHECK-NOPCREL-NEXT: lfd f1, .LCPI3_0@toc@l(r3) 75; CHECK-NOPCREL-NEXT: blr 76 77entry: 78 ret double 3.423300e+02 79} 80 81define dso_local float @testFloatDenormScalar() local_unnamed_addr { 82; CHECK-LABEL: testFloatDenormScalar: 83; CHECK: # %bb.0: # %entry 84; CHECK-NEXT: plfs f1, .LCPI4_0@PCREL(0), 1 85; CHECK-NEXT: blr 86; 87; CHECK-NOPCREL-LABEL: testFloatDenormScalar: 88; CHECK-NOPCREL: # %bb.0: # %entry 89; CHECK-NOPCREL-NEXT: addis r3, r2, .LCPI4_0@toc@ha 90; CHECK-NOPCREL-NEXT: lfs f1, .LCPI4_0@toc@l(r3) 91; CHECK-NOPCREL-NEXT: blr 92 93entry: 94 ret float 0x380B38FB80000000 95} 96 97define dso_local double @testFloatDenormToDoubleScalar() local_unnamed_addr { 98; CHECK-LABEL: testFloatDenormToDoubleScalar: 99; CHECK: # %bb.0: # %entry 100; CHECK-NEXT: plfs f1, .LCPI5_0@PCREL(0), 1 101; CHECK-NEXT: blr 102; 103; CHECK-NOPCREL-LABEL: testFloatDenormToDoubleScalar: 104; CHECK-NOPCREL: # %bb.0: # %entry 105; CHECK-NOPCREL-NEXT: addis r3, r2, .LCPI5_0@toc@ha 106; CHECK-NOPCREL-NEXT: lfs f1, .LCPI5_0@toc@l(r3) 107; CHECK-NOPCREL-NEXT: blr 108 109entry: 110 ret double 0x380B38FB80000000 111} 112