1*0a6a1f1dSLionel Sambuc; RUN: llc -mtriple=arm-eabi -mattr=+vfp2 %s -o - \ 2*0a6a1f1dSLionel Sambuc; RUN: | FileCheck %s -check-prefix=VFP2 3*0a6a1f1dSLionel Sambuc 4*0a6a1f1dSLionel Sambuc; RUN: llc -mtriple=arm-eabi -mattr=+neon %s -o - \ 5*0a6a1f1dSLionel Sambuc; RUN: | FileCheck %s -check-prefix=NEON 6*0a6a1f1dSLionel Sambuc 7*0a6a1f1dSLionel Sambuc; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a8 %s -o - \ 8*0a6a1f1dSLionel Sambuc; RUN: | FileCheck %s -check-prefix=A8 9*0a6a1f1dSLionel Sambuc 10*0a6a1f1dSLionel Sambuc; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a8 -regalloc=basic %s -o - \ 11*0a6a1f1dSLionel Sambuc; RUN: | FileCheck %s -check-prefix=A8 12*0a6a1f1dSLionel Sambuc 13*0a6a1f1dSLionel Sambuc; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a8 --enable-unsafe-fp-math %s -o - \ 14*0a6a1f1dSLionel Sambuc; RUN: | FileCheck %s -check-prefix=A8U 15*0a6a1f1dSLionel Sambuc 16*0a6a1f1dSLionel Sambuc; RUN: llc -mtriple=arm-darwin -mcpu=cortex-a8 %s -o - \ 17*0a6a1f1dSLionel Sambuc; RUN: | FileCheck %s -check-prefix=A8U 18f4a2713aSLionel Sambuc 19f4a2713aSLionel Sambucdefine float @t1(float %acc, float %a, float %b) nounwind { 20f4a2713aSLionel Sambucentry: 21f4a2713aSLionel Sambuc; VFP2-LABEL: t1: 22f4a2713aSLionel Sambuc; VFP2: vnmla.f32 23f4a2713aSLionel Sambuc 24f4a2713aSLionel Sambuc; NEON-LABEL: t1: 25f4a2713aSLionel Sambuc; NEON: vnmla.f32 26f4a2713aSLionel Sambuc 27f4a2713aSLionel Sambuc; A8U-LABEL: t1: 28f4a2713aSLionel Sambuc; A8U: vnmul.f32 s{{[0-9]}}, s{{[0-9]}}, s{{[0-9]}} 29f4a2713aSLionel Sambuc; A8U: vsub.f32 d{{[0-9]}}, d{{[0-9]}}, d{{[0-9]}} 30f4a2713aSLionel Sambuc 31f4a2713aSLionel Sambuc; A8-LABEL: t1: 32f4a2713aSLionel Sambuc; A8: vnmul.f32 s{{[0-9]}}, s{{[0-9]}}, s{{[0-9]}} 33f4a2713aSLionel Sambuc; A8: vsub.f32 s{{[0-9]}}, s{{[0-9]}}, s{{[0-9]}} 34f4a2713aSLionel Sambuc %0 = fmul float %a, %b 35f4a2713aSLionel Sambuc %1 = fsub float -0.0, %0 36f4a2713aSLionel Sambuc %2 = fsub float %1, %acc 37f4a2713aSLionel Sambuc ret float %2 38f4a2713aSLionel Sambuc} 39f4a2713aSLionel Sambuc 40f4a2713aSLionel Sambucdefine float @t2(float %acc, float %a, float %b) nounwind { 41f4a2713aSLionel Sambucentry: 42f4a2713aSLionel Sambuc; VFP2-LABEL: t2: 43f4a2713aSLionel Sambuc; VFP2: vnmla.f32 44f4a2713aSLionel Sambuc 45f4a2713aSLionel Sambuc; NEON-LABEL: t2: 46f4a2713aSLionel Sambuc; NEON: vnmla.f32 47f4a2713aSLionel Sambuc 48f4a2713aSLionel Sambuc; A8U-LABEL: t2: 49f4a2713aSLionel Sambuc; A8U: vnmul.f32 s{{[01234]}}, s{{[01234]}}, s{{[01234]}} 50f4a2713aSLionel Sambuc; A8U: vsub.f32 d{{[0-9]}}, d{{[0-9]}}, d{{[0-9]}} 51f4a2713aSLionel Sambuc 52f4a2713aSLionel Sambuc; A8-LABEL: t2: 53f4a2713aSLionel Sambuc; A8: vnmul.f32 s{{[01234]}}, s{{[01234]}}, s{{[01234]}} 54f4a2713aSLionel Sambuc; A8: vsub.f32 s{{[0-9]}}, s{{[0-9]}}, s{{[0-9]}} 55f4a2713aSLionel Sambuc %0 = fmul float %a, %b 56f4a2713aSLionel Sambuc %1 = fmul float -1.0, %0 57f4a2713aSLionel Sambuc %2 = fsub float %1, %acc 58f4a2713aSLionel Sambuc ret float %2 59f4a2713aSLionel Sambuc} 60f4a2713aSLionel Sambuc 61f4a2713aSLionel Sambucdefine double @t3(double %acc, double %a, double %b) nounwind { 62f4a2713aSLionel Sambucentry: 63f4a2713aSLionel Sambuc; VFP2-LABEL: t3: 64f4a2713aSLionel Sambuc; VFP2: vnmla.f64 65f4a2713aSLionel Sambuc 66f4a2713aSLionel Sambuc; NEON-LABEL: t3: 67f4a2713aSLionel Sambuc; NEON: vnmla.f64 68f4a2713aSLionel Sambuc 69f4a2713aSLionel Sambuc; A8U-LABEL: t3: 70f4a2713aSLionel Sambuc; A8U: vnmul.f64 d 71f4a2713aSLionel Sambuc; A8U: vsub.f64 d 72f4a2713aSLionel Sambuc 73f4a2713aSLionel Sambuc; A8-LABEL: t3: 74f4a2713aSLionel Sambuc; A8: vnmul.f64 d 75f4a2713aSLionel Sambuc; A8: vsub.f64 d 76f4a2713aSLionel Sambuc %0 = fmul double %a, %b 77f4a2713aSLionel Sambuc %1 = fsub double -0.0, %0 78f4a2713aSLionel Sambuc %2 = fsub double %1, %acc 79f4a2713aSLionel Sambuc ret double %2 80f4a2713aSLionel Sambuc} 81f4a2713aSLionel Sambuc 82f4a2713aSLionel Sambucdefine double @t4(double %acc, double %a, double %b) nounwind { 83f4a2713aSLionel Sambucentry: 84f4a2713aSLionel Sambuc; VFP2-LABEL: t4: 85f4a2713aSLionel Sambuc; VFP2: vnmla.f64 86f4a2713aSLionel Sambuc 87f4a2713aSLionel Sambuc; NEON-LABEL: t4: 88f4a2713aSLionel Sambuc; NEON: vnmla.f64 89f4a2713aSLionel Sambuc 90f4a2713aSLionel Sambuc; A8U-LABEL: t4: 91f4a2713aSLionel Sambuc; A8U: vnmul.f64 d 92f4a2713aSLionel Sambuc; A8U: vsub.f64 d 93f4a2713aSLionel Sambuc 94f4a2713aSLionel Sambuc; A8-LABEL: t4: 95f4a2713aSLionel Sambuc; A8: vnmul.f64 d 96f4a2713aSLionel Sambuc; A8: vsub.f64 d 97f4a2713aSLionel Sambuc %0 = fmul double %a, %b 98f4a2713aSLionel Sambuc %1 = fmul double -1.0, %0 99f4a2713aSLionel Sambuc %2 = fsub double %1, %acc 100f4a2713aSLionel Sambuc ret double %2 101f4a2713aSLionel Sambuc} 102