Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
test/CodeGen/PowerPC/fmf-propagation.ll
Show First 20 Lines • Show All 298 Lines • ▼ Show 20 Lines | |||||
; Reduced precision for sqrt is allowed - should use estimate and NR iterations. | ; Reduced precision for sqrt is allowed - should use estimate and NR iterations. | ||||
; FMFDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_afn:' | ; FMFDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_afn:' | ||||
; FMFDEBUG: fsqrt afn {{t[0-9]+}} | ; FMFDEBUG: fsqrt afn {{t[0-9]+}} | ||||
; FMFDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_afn:' | ; FMFDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_afn:' | ||||
; GLOBALDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_afn:' | ; GLOBALDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_afn:' | ||||
; GLOBALDEBUG: fmul reassoc {{t[0-9]+}} | ; GLOBALDEBUG: fmul afn {{t[0-9]+}} | ||||
; GLOBALDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_afn:' | ; GLOBALDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_afn:' | ||||
define float @sqrt_afn(float %x) { | define float @sqrt_afn(float %x) { | ||||
; FMF-LABEL: sqrt_afn: | ; FMF-LABEL: sqrt_afn: | ||||
; FMF: # %bb.0: | ; FMF: # %bb.0: | ||||
; FMF-NEXT: xssqrtsp 1, 1 | ; FMF-NEXT: xssqrtsp 1, 1 | ||||
; FMF-NEXT: blr | ; FMF-NEXT: blr | ||||
; | ; | ||||
Show All 19 Lines | |||||
; GLOBAL-NEXT: blr | ; GLOBAL-NEXT: blr | ||||
%rt = call afn float @llvm.sqrt.f32(float %x) | %rt = call afn float @llvm.sqrt.f32(float %x) | ||||
ret float %rt | ret float %rt | ||||
} | } | ||||
; The call is now fully 'fast'. This implies that approximation is allowed. | ; The call is now fully 'fast'. This implies that approximation is allowed. | ||||
; FMFDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_fast:' | ; FMFDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_fast:' | ||||
; FMFDEBUG: fsqrt nnan ninf nsz arcp contract afn reassoc {{t[0-9]+}} | ; FMFDEBUG: fmul nnan ninf nsz arcp contract afn reassoc {{t[0-9]+}} | ||||
; FMFDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_fast:' | ; FMFDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_fast:' | ||||
; GLOBALDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_fast:' | ; GLOBALDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_fast:' | ||||
; GLOBALDEBUG: fmul reassoc {{t[0-9]+}} | ; GLOBALDEBUG: fmul nnan ninf nsz arcp contract afn reassoc {{t[0-9]+}} | ||||
; GLOBALDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_fast:' | ; GLOBALDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_fast:' | ||||
define float @sqrt_fast(float %x) { | define float @sqrt_fast(float %x) { | ||||
; FMF-LABEL: sqrt_fast: | ; FMF-LABEL: sqrt_fast: | ||||
; FMF: # %bb.0: | ; FMF: # %bb.1: | ||||
; FMF-NEXT: xssqrtsp 1, 1 | ; FMF-NEXT: xsrsqrtesp 2, 1 | ||||
; FMF-NEXT: blr | ; FMF: blr | ||||
; | ; | ||||
spatel: Is there some reason for trimming the output here? I think it's important that we show the… | |||||
; GLOBAL-LABEL: sqrt_fast: | ; GLOBAL-LABEL: sqrt_fast: | ||||
; GLOBAL: # %bb.0: | ; GLOBAL: # %bb.0: | ||||
; GLOBAL-NEXT: xxlxor 0, 0, 0 | ; GLOBAL-NEXT: xxlxor 0, 0, 0 | ||||
; GLOBAL-NEXT: fcmpu 0, 1, 0 | ; GLOBAL-NEXT: fcmpu 0, 1, 0 | ||||
; GLOBAL-NEXT: beq 0, .LBB11_2 | ; GLOBAL-NEXT: beq 0, .LBB11_2 | ||||
; GLOBAL-NEXT: # %bb.1: | ; GLOBAL-NEXT: # %bb.1: | ||||
; GLOBAL-NEXT: xsrsqrtesp 2, 1 | ; GLOBAL-NEXT: xsrsqrtesp 2, 1 | ||||
; GLOBAL-NEXT: addis 3, 2, .LCPI11_0@toc@ha | ; GLOBAL-NEXT: addis 3, 2, .LCPI11_0@toc@ha | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |
Is there some reason for trimming the output here? I think it's important that we show the entire estimate sequence here to be consistent. Otherwise, it's misleading as it appears that we only need the raw estimate instruction.