X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FCodeGen%2FARM%2Ffnmscs.ll;h=5fa6b219388d5b10e921ecb23f0ebce94c69befe;hb=b5d75790a5377f7a199f263d9b287c10d306c2ad;hp=0b47edd5f1f121546898d2ffb0dfa32e2a15d289;hpb=f7d87ee1584bffe361b39f8cec7a39131c8c4efc;p=oota-llvm.git diff --git a/test/CodeGen/ARM/fnmscs.ll b/test/CodeGen/ARM/fnmscs.ll index 0b47edd5f1f..5fa6b219388 100644 --- a/test/CodeGen/ARM/fnmscs.ll +++ b/test/CodeGen/ARM/fnmscs.ll @@ -1,23 +1,101 @@ -; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s -; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s -; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s -; RUN: llc < %s -march=arm -mcpu=cortex-a9 | FileCheck %s +; RUN: llc -mtriple=arm-eabi -mattr=+vfp2 %s -o - \ +; RUN: | FileCheck %s -check-prefix=VFP2 -define float @test1(float %acc, float %a, float %b) nounwind { -; CHECK: vnmla.f32 s{{.*}}, s{{.*}}, s{{.*}} +; RUN: llc -mtriple=arm-eabi -mattr=+neon %s -o - \ +; RUN: | FileCheck %s -check-prefix=NEON + +; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a8 %s -o - \ +; RUN: | FileCheck %s -check-prefix=A8 + +; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a8 -regalloc=basic %s -o - \ +; RUN: | FileCheck %s -check-prefix=A8 + +; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a8 --enable-unsafe-fp-math %s -o - \ +; RUN: | FileCheck %s -check-prefix=A8U + +; RUN: llc -mtriple=arm-darwin -mcpu=cortex-a8 %s -o - \ +; RUN: | FileCheck %s -check-prefix=A8U + +define float @t1(float %acc, float %a, float %b) nounwind { entry: +; VFP2-LABEL: t1: +; VFP2: vnmla.f32 + +; NEON-LABEL: t1: +; NEON: vnmla.f32 + +; A8U-LABEL: t1: +; A8U: vnmul.f32 s{{[0-9]}}, s{{[0-9]}}, s{{[0-9]}} +; A8U: vsub.f32 d{{[0-9]}}, d{{[0-9]}}, d{{[0-9]}} + +; A8-LABEL: t1: +; A8: vnmul.f32 s{{[0-9]}}, s{{[0-9]}}, s{{[0-9]}} +; A8: vsub.f32 s{{[0-9]}}, s{{[0-9]}}, s{{[0-9]}} %0 = fmul float %a, %b %1 = fsub float -0.0, %0 %2 = fsub float %1, %acc ret float %2 } -define float @test2(float %acc, float %a, float %b) nounwind { -; CHECK: vnmla.f32 s{{.*}}, s{{.*}}, s{{.*}} +define float @t2(float %acc, float %a, float %b) nounwind { entry: +; VFP2-LABEL: t2: +; VFP2: vnmla.f32 + +; NEON-LABEL: t2: +; NEON: vnmla.f32 + +; A8U-LABEL: t2: +; A8U: vnmul.f32 s{{[01234]}}, s{{[01234]}}, s{{[01234]}} +; A8U: vsub.f32 d{{[0-9]}}, d{{[0-9]}}, d{{[0-9]}} + +; A8-LABEL: t2: +; A8: vnmul.f32 s{{[01234]}}, s{{[01234]}}, s{{[01234]}} +; A8: vsub.f32 s{{[0-9]}}, s{{[0-9]}}, s{{[0-9]}} %0 = fmul float %a, %b %1 = fmul float -1.0, %0 %2 = fsub float %1, %acc ret float %2 } +define double @t3(double %acc, double %a, double %b) nounwind { +entry: +; VFP2-LABEL: t3: +; VFP2: vnmla.f64 + +; NEON-LABEL: t3: +; NEON: vnmla.f64 + +; A8U-LABEL: t3: +; A8U: vnmul.f64 d +; A8U: vsub.f64 d + +; A8-LABEL: t3: +; A8: vnmul.f64 d +; A8: vsub.f64 d + %0 = fmul double %a, %b + %1 = fsub double -0.0, %0 + %2 = fsub double %1, %acc + ret double %2 +} + +define double @t4(double %acc, double %a, double %b) nounwind { +entry: +; VFP2-LABEL: t4: +; VFP2: vnmla.f64 + +; NEON-LABEL: t4: +; NEON: vnmla.f64 + +; A8U-LABEL: t4: +; A8U: vnmul.f64 d +; A8U: vsub.f64 d + +; A8-LABEL: t4: +; A8: vnmul.f64 d +; A8: vsub.f64 d + %0 = fmul double %a, %b + %1 = fmul double -1.0, %0 + %2 = fsub double %1, %acc + ret double %2 +}