brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · c2f977c Raw
61 lines · plain
1; RUN: llc -verify-machineinstrs -o - %s -mtriple=aarch64-linux-gnu -mcpu=cyclone | FileCheck %s2 3@varfloat = global float 0.04@vardouble = global double 0.05 6define void @testfloat() {7; CHECK-LABEL: testfloat:8  %val1 = load float, ptr @varfloat9 10  %val2 = fadd float %val1, %val111; CHECK: fadd {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}12 13  %val3 = fmul float %val2, %val114; CHECK: fmul {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}15 16  %val4 = fdiv float %val3, %val117; CHECK: fdiv {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}18 19  %val5 = fsub float %val4, %val220; CHECK: fsub {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}21 22  store volatile float %val5, ptr @varfloat23 24; These will be enabled with the implementation of floating-point litpool entries.25  %val6 = fmul float %val1, %val226  %val7 = fsub float -0.0, %val627; CHECK: fnmul {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}28 29  store volatile float %val7, ptr @varfloat30 31  ret void32}33 34define void @testdouble() {35; CHECK-LABEL: testdouble:36  %val1 = load double, ptr @vardouble37 38  %val2 = fadd double %val1, %val139; CHECK: fadd {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}40 41  %val3 = fmul double %val2, %val142; CHECK: fmul {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}43 44  %val4 = fdiv double %val3, %val145; CHECK: fdiv {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}46 47  %val5 = fsub double %val4, %val248; CHECK: fsub {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}49 50  store volatile double %val5, ptr @vardouble51 52; These will be enabled with the implementation of doubleing-point litpool entries.53   %val6 = fmul double %val1, %val254   %val7 = fsub double -0.0, %val655; CHECK: fnmul {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}56 57   store volatile double %val7, ptr @vardouble58 59  ret void60}61