Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/trunk/test/CodeGen/X86/fmf-flags.ll
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||||
; RUN: llc < %s -mtriple=x86_64-unknown | FileCheck %s -check-prefix=X64 | ; RUN: llc < %s -mtriple=x86_64-unknown | FileCheck %s -check-prefix=X64 | ||||
; RUN: llc < %s -mtriple=i686-unknown | FileCheck %s -check-prefix=X86 | ; RUN: llc < %s -mtriple=i686-unknown | FileCheck %s -check-prefix=X86 | ||||
declare float @llvm.sqrt.f32(float %x); | declare float @llvm.sqrt.f32(float %x); | ||||
define float @fast_recip_sqrt(float %x) { | define float @fast_recip_sqrt(float %x) { | ||||
; X64-LABEL: fast_recip_sqrt: | ; X64-LABEL: fast_recip_sqrt: | ||||
; X64: # %bb.0: | ; X64: # %bb.0: | ||||
; X64-NEXT: sqrtss %xmm0, %xmm1 | ; X64-NEXT: rsqrtss %xmm0, %xmm1 | ||||
; X64-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero | ; X64-NEXT: xorps %xmm2, %xmm2 | ||||
; X64-NEXT: divss %xmm1, %xmm0 | ; X64-NEXT: cmpeqss %xmm0, %xmm2 | ||||
; X64-NEXT: mulss %xmm1, %xmm0 | |||||
; X64-NEXT: movss {{.*}}(%rip), %xmm3 | |||||
; X64-NEXT: mulss %xmm0, %xmm3 | |||||
; X64-NEXT: mulss %xmm1, %xmm0 | |||||
; X64-NEXT: addss {{.*}}(%rip), %xmm0 | |||||
; X64-NEXT: mulss %xmm3, %xmm0 | |||||
; X64-NEXT: andnps %xmm0, %xmm2 | |||||
; X64-NEXT: movss {{.*}}(%rip), %xmm0 | |||||
; X64-NEXT: divss %xmm2, %xmm0 | |||||
; X64-NEXT: retq | ; X64-NEXT: retq | ||||
; | ; | ||||
; X86-LABEL: fast_recip_sqrt: | ; X86-LABEL: fast_recip_sqrt: | ||||
; X86: # %bb.0: | ; X86: # %bb.0: | ||||
; X86-NEXT: flds {{[0-9]+}}(%esp) | ; X86-NEXT: flds {{[0-9]+}}(%esp) | ||||
; X86-NEXT: fsqrt | ; X86-NEXT: fsqrt | ||||
; X86-NEXT: fld1 | ; X86-NEXT: fld1 | ||||
; X86-NEXT: fdivp %st(1) | ; X86-NEXT: fdivp %st(1) | ||||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |