1 ; RUN: llc < %s -mtriple=aarch64 -mattr=neon -recip=!div,!vec-div | FileCheck %s --check-prefix=FAULT 2 ; RUN: llc < %s -mtriple=aarch64 -mattr=neon -recip=div,vec-div | FileCheck %s 3 4 define float @frecp(float %x) #0 { 5 %div = fdiv fast float 1.0, %x 6 ret float %div 7 8 ; FAULT-LABEL: frecp: 9 ; FAULT-NEXT: BB#0 10 ; FAULT-NEXT: fmov 11 ; FAULT-NEXT: fdiv 12 13 ; CHECK-LABEL: frecp: 14 ; CHECK-NEXT: BB#0 15 ; CHECK-NEXT: frecpe 16 ; CHECK-NEXT: fmov 17 } 18 19 define <2 x float> @f2recp(<2 x float> %x) #0 { 20 %div = fdiv fast <2 x float> <float 1.0, float 1.0>, %x 21 ret <2 x float> %div 22 23 ; FAULT-LABEL: f2recp: 24 ; FAULT-NEXT: BB#0 25 ; FAULT-NEXT: fmov 26 ; FAULT-NEXT: fdiv 27 28 ; CHECK-LABEL: f2recp: 29 ; CHECK-NEXT: BB#0 30 ; CHECK-NEXT: fmov 31 ; CHECK-NEXT: frecpe 32 } 33 34 define <4 x float> @f4recp(<4 x float> %x) #0 { 35 %div = fdiv fast <4 x float> <float 1.0, float 1.0, float 1.0, float 1.0>, %x 36 ret <4 x float> %div 37 38 ; FAULT-LABEL: f4recp: 39 ; FAULT-NEXT: BB#0 40 ; FAULT-NEXT: fmov 41 ; FAULT-NEXT: fdiv 42 43 ; CHECK-LABEL: f4recp: 44 ; CHECK-NEXT: BB#0 45 ; CHECK-NEXT: fmov 46 ; CHECK-NEXT: frecpe 47 } 48 49 define double @drecp(double %x) #0 { 50 %div = fdiv fast double 1.0, %x 51 ret double %div 52 53 ; FAULT-LABEL: drecp: 54 ; FAULT-NEXT: BB#0 55 ; FAULT-NEXT: fmov 56 ; FAULT-NEXT: fdiv 57 58 ; CHECK-LABEL: drecp: 59 ; CHECK-NEXT: BB#0 60 ; CHECK-NEXT: frecpe 61 ; CHECK-NEXT: fmov 62 } 63 64 define <2 x double> @d2recp(<2 x double> %x) #0 { 65 %div = fdiv fast <2 x double> <double 1.0, double 1.0>, %x 66 ret <2 x double> %div 67 68 ; FAULT-LABEL: d2recp: 69 ; FAULT-NEXT: BB#0 70 ; FAULT-NEXT: fmov 71 ; FAULT-NEXT: fdiv 72 73 ; CHECK-LABEL: d2recp: 74 ; CHECK-NEXT: BB#0 75 ; CHECK-NEXT: fmov 76 ; CHECK-NEXT: frecpe 77 } 78 79 attributes #0 = { nounwind "unsafe-fp-math"="true" } 80