1 ; Test floating-point negation.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z10 | FileCheck %s
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
7 define float @f1(float %f) {
9 ; CHECK: lcdfr %f0, %f0
16 define double @f2(double %f) {
18 ; CHECK: lcdfr %f0, %f0
24 ; Test f128. With the loads and stores, a pure negation would probably
25 ; be better implemented using an XI on the upper byte. Do some extra
26 ; processing so that using FPRs is unequivocally better.
27 define void @f3(ptr %ptr, ptr %ptr2) {
32 %orig = load fp128, ptr %ptr
33 %negzero = fpext float -0.0 to fp128
34 %neg = fneg fp128 %orig
35 %op2 = load fp128, ptr %ptr2
36 %res = fdiv fp128 %neg, %op2
37 store fp128 %res, ptr %ptr