Skip to content

Commit de71617

Browse files
committed
PPC: Prepare tests for switch of default denormal-fp-math
These tests fail when the default is switched to assume IEEE denormal handling. I'm not sure if PPC really has a way to control the denormal input handling.
1 parent a4384c7 commit de71617

File tree

3 files changed

+238
-40
lines changed

3 files changed

+238
-40
lines changed

llvm/test/CodeGen/PowerPC/fmf-propagation.ll

Lines changed: 146 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -269,20 +269,23 @@ define float @fmul_fma_fast2(float %x) {
269269

270270
; Reduced precision for sqrt is allowed - should use estimate and NR iterations.
271271

272-
; FMFDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_afn:'
272+
; FMFDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_afn_ieee:'
273273
; FMFDEBUG: fmul afn {{t[0-9]+}}
274-
; FMFDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_afn:'
274+
; FMFDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_afn_ieee:'
275275

276-
; GLOBALDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_afn:'
276+
; GLOBALDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_afn_ieee:'
277277
; GLOBALDEBUG: fmul afn {{t[0-9]+}}
278-
; GLOBALDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_afn:'
278+
; GLOBALDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_afn_ieee:'
279279

280-
define float @sqrt_afn(float %x) {
281-
; FMF-LABEL: sqrt_afn:
280+
define float @sqrt_afn_ieee(float %x) #0 {
281+
; FMF-LABEL: sqrt_afn_ieee:
282282
; FMF: # %bb.0:
283+
; FMF-NEXT: addis 3, 2, .LCPI10_2@toc@ha
284+
; FMF-NEXT: fabs 0, 1
285+
; FMF-NEXT: lfs 2, .LCPI10_2@toc@l(3)
286+
; FMF-NEXT: fcmpu 0, 0, 2
283287
; FMF-NEXT: xxlxor 0, 0, 0
284-
; FMF-NEXT: fcmpu 0, 1, 0
285-
; FMF-NEXT: beq 0, .LBB10_2
288+
; FMF-NEXT: blt 0, .LBB10_2
286289
; FMF-NEXT: # %bb.1:
287290
; FMF-NEXT: xsrsqrtesp 0, 1
288291
; FMF-NEXT: addis 3, 2, .LCPI10_0@toc@ha
@@ -298,11 +301,14 @@ define float @sqrt_afn(float %x) {
298301
; FMF-NEXT: fmr 1, 0
299302
; FMF-NEXT: blr
300303
;
301-
; GLOBAL-LABEL: sqrt_afn:
304+
; GLOBAL-LABEL: sqrt_afn_ieee:
302305
; GLOBAL: # %bb.0:
306+
; GLOBAL-NEXT: addis 3, 2, .LCPI10_2@toc@ha
307+
; GLOBAL-NEXT: fabs 0, 1
308+
; GLOBAL-NEXT: lfs 2, .LCPI10_2@toc@l(3)
309+
; GLOBAL-NEXT: fcmpu 0, 0, 2
303310
; GLOBAL-NEXT: xxlxor 0, 0, 0
304-
; GLOBAL-NEXT: fcmpu 0, 1, 0
305-
; GLOBAL-NEXT: beq 0, .LBB10_2
311+
; GLOBAL-NEXT: blt 0, .LBB10_2
306312
; GLOBAL-NEXT: # %bb.1:
307313
; GLOBAL-NEXT: xsrsqrtesp 0, 1
308314
; GLOBAL-NEXT: addis 3, 2, .LCPI10_0@toc@ha
@@ -320,18 +326,16 @@ define float @sqrt_afn(float %x) {
320326
ret float %rt
321327
}
322328

323-
; The call is now fully 'fast'. This implies that approximation is allowed.
324-
325-
; FMFDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_fast:'
326-
; FMFDEBUG: fmul nnan ninf nsz arcp contract afn reassoc {{t[0-9]+}}
327-
; FMFDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_fast:'
329+
; FMFDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_afn_preserve_sign:'
330+
; FMFDEBUG: fmul afn {{t[0-9]+}}
331+
; FMFDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_afn_preserve_sign:'
328332

329-
; GLOBALDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_fast:'
330-
; GLOBALDEBUG: fmul nnan ninf nsz arcp contract afn reassoc {{t[0-9]+}}
331-
; GLOBALDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_fast:'
333+
; GLOBALDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_afn_preserve_sign:'
334+
; GLOBALDEBUG: fmul afn {{t[0-9]+}}
335+
; GLOBALDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_afn_preserve_sign:'
332336

333-
define float @sqrt_fast(float %x) {
334-
; FMF-LABEL: sqrt_fast:
337+
define float @sqrt_afn_preserve_sign(float %x) #1 {
338+
; FMF-LABEL: sqrt_afn_preserve_sign:
335339
; FMF: # %bb.0:
336340
; FMF-NEXT: xxlxor 0, 0, 0
337341
; FMF-NEXT: fcmpu 0, 1, 0
@@ -343,14 +347,15 @@ define float @sqrt_fast(float %x) {
343347
; FMF-NEXT: lfs 2, .LCPI11_0@toc@l(3)
344348
; FMF-NEXT: lfs 3, .LCPI11_1@toc@l(4)
345349
; FMF-NEXT: xsmulsp 1, 1, 0
346-
; FMF-NEXT: xsmaddasp 2, 1, 0
347-
; FMF-NEXT: xsmulsp 0, 1, 3
348-
; FMF-NEXT: xsmulsp 0, 0, 2
350+
; FMF-NEXT: xsmulsp 0, 1, 0
351+
; FMF-NEXT: xsmulsp 1, 1, 2
352+
; FMF-NEXT: xsaddsp 0, 0, 3
353+
; FMF-NEXT: xsmulsp 0, 1, 0
349354
; FMF-NEXT: .LBB11_2:
350355
; FMF-NEXT: fmr 1, 0
351356
; FMF-NEXT: blr
352357
;
353-
; GLOBAL-LABEL: sqrt_fast:
358+
; GLOBAL-LABEL: sqrt_afn_preserve_sign:
354359
; GLOBAL: # %bb.0:
355360
; GLOBAL-NEXT: xxlxor 0, 0, 0
356361
; GLOBAL-NEXT: fcmpu 0, 1, 0
@@ -367,6 +372,116 @@ define float @sqrt_fast(float %x) {
367372
; GLOBAL-NEXT: xsmulsp 0, 0, 2
368373
; GLOBAL-NEXT: .LBB11_2:
369374
; GLOBAL-NEXT: fmr 1, 0
375+
; GLOBAL-NEXT: blr
376+
%rt = call afn float @llvm.sqrt.f32(float %x)
377+
ret float %rt
378+
}
379+
380+
; The call is now fully 'fast'. This implies that approximation is allowed.
381+
382+
; FMFDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_fast_ieee:'
383+
; FMFDEBUG: fmul nnan ninf nsz arcp contract afn reassoc {{t[0-9]+}}
384+
; FMFDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_fast_ieee:'
385+
386+
; GLOBALDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_fast_ieee:'
387+
; GLOBALDEBUG: fmul nnan ninf nsz arcp contract afn reassoc {{t[0-9]+}}
388+
; GLOBALDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_fast_ieee:'
389+
390+
define float @sqrt_fast_ieee(float %x) #0 {
391+
; FMF-LABEL: sqrt_fast_ieee:
392+
; FMF: # %bb.0:
393+
; FMF-NEXT: addis 3, 2, .LCPI12_2@toc@ha
394+
; FMF-NEXT: fabs 0, 1
395+
; FMF-NEXT: lfs 2, .LCPI12_2@toc@l(3)
396+
; FMF-NEXT: fcmpu 0, 0, 2
397+
; FMF-NEXT: xxlxor 0, 0, 0
398+
; FMF-NEXT: blt 0, .LBB12_2
399+
; FMF-NEXT: # %bb.1:
400+
; FMF-NEXT: xsrsqrtesp 0, 1
401+
; FMF-NEXT: addis 3, 2, .LCPI12_0@toc@ha
402+
; FMF-NEXT: addis 4, 2, .LCPI12_1@toc@ha
403+
; FMF-NEXT: lfs 2, .LCPI12_0@toc@l(3)
404+
; FMF-NEXT: lfs 3, .LCPI12_1@toc@l(4)
405+
; FMF-NEXT: xsmulsp 1, 1, 0
406+
; FMF-NEXT: xsmaddasp 2, 1, 0
407+
; FMF-NEXT: xsmulsp 0, 1, 3
408+
; FMF-NEXT: xsmulsp 0, 0, 2
409+
; FMF-NEXT: .LBB12_2:
410+
; FMF-NEXT: fmr 1, 0
411+
; FMF-NEXT: blr
412+
;
413+
; GLOBAL-LABEL: sqrt_fast_ieee:
414+
; GLOBAL: # %bb.0:
415+
; GLOBAL-NEXT: addis 3, 2, .LCPI12_2@toc@ha
416+
; GLOBAL-NEXT: fabs 0, 1
417+
; GLOBAL-NEXT: lfs 2, .LCPI12_2@toc@l(3)
418+
; GLOBAL-NEXT: fcmpu 0, 0, 2
419+
; GLOBAL-NEXT: xxlxor 0, 0, 0
420+
; GLOBAL-NEXT: blt 0, .LBB12_2
421+
; GLOBAL-NEXT: # %bb.1:
422+
; GLOBAL-NEXT: xsrsqrtesp 0, 1
423+
; GLOBAL-NEXT: addis 3, 2, .LCPI12_0@toc@ha
424+
; GLOBAL-NEXT: addis 4, 2, .LCPI12_1@toc@ha
425+
; GLOBAL-NEXT: lfs 2, .LCPI12_0@toc@l(3)
426+
; GLOBAL-NEXT: lfs 3, .LCPI12_1@toc@l(4)
427+
; GLOBAL-NEXT: xsmulsp 1, 1, 0
428+
; GLOBAL-NEXT: xsmaddasp 2, 1, 0
429+
; GLOBAL-NEXT: xsmulsp 0, 1, 3
430+
; GLOBAL-NEXT: xsmulsp 0, 0, 2
431+
; GLOBAL-NEXT: .LBB12_2:
432+
; GLOBAL-NEXT: fmr 1, 0
433+
; GLOBAL-NEXT: blr
434+
%rt = call fast float @llvm.sqrt.f32(float %x)
435+
ret float %rt
436+
}
437+
438+
; The call is now fully 'fast'. This implies that approximation is allowed.
439+
440+
; FMFDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_fast_preserve_sign:'
441+
; FMFDEBUG: fmul nnan ninf nsz arcp contract afn reassoc {{t[0-9]+}}
442+
; FMFDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_fast_preserve_sign:'
443+
444+
; GLOBALDEBUG-LABEL: Optimized lowered selection DAG: %bb.0 'sqrt_fast_preserve_sign:'
445+
; GLOBALDEBUG: fmul nnan ninf nsz arcp contract afn reassoc {{t[0-9]+}}
446+
; GLOBALDEBUG: Type-legalized selection DAG: %bb.0 'sqrt_fast_preserve_sign:'
447+
448+
define float @sqrt_fast_preserve_sign(float %x) #1 {
449+
; FMF-LABEL: sqrt_fast_preserve_sign:
450+
; FMF: # %bb.0:
451+
; FMF-NEXT: xxlxor 0, 0, 0
452+
; FMF-NEXT: fcmpu 0, 1, 0
453+
; FMF-NEXT: beq 0, .LBB13_2
454+
; FMF-NEXT: # %bb.1:
455+
; FMF-NEXT: xsrsqrtesp 0, 1
456+
; FMF-NEXT: addis 3, 2, .LCPI13_0@toc@ha
457+
; FMF-NEXT: addis 4, 2, .LCPI13_1@toc@ha
458+
; FMF-NEXT: lfs 2, .LCPI13_0@toc@l(3)
459+
; FMF-NEXT: lfs 3, .LCPI13_1@toc@l(4)
460+
; FMF-NEXT: xsmulsp 1, 1, 0
461+
; FMF-NEXT: xsmaddasp 2, 1, 0
462+
; FMF-NEXT: xsmulsp 0, 1, 3
463+
; FMF-NEXT: xsmulsp 0, 0, 2
464+
; FMF-NEXT: .LBB13_2:
465+
; FMF-NEXT: fmr 1, 0
466+
; FMF-NEXT: blr
467+
;
468+
; GLOBAL-LABEL: sqrt_fast_preserve_sign:
469+
; GLOBAL: # %bb.0:
470+
; GLOBAL-NEXT: xxlxor 0, 0, 0
471+
; GLOBAL-NEXT: fcmpu 0, 1, 0
472+
; GLOBAL-NEXT: beq 0, .LBB13_2
473+
; GLOBAL-NEXT: # %bb.1:
474+
; GLOBAL-NEXT: xsrsqrtesp 0, 1
475+
; GLOBAL-NEXT: addis 3, 2, .LCPI13_0@toc@ha
476+
; GLOBAL-NEXT: addis 4, 2, .LCPI13_1@toc@ha
477+
; GLOBAL-NEXT: lfs 2, .LCPI13_0@toc@l(3)
478+
; GLOBAL-NEXT: lfs 3, .LCPI13_1@toc@l(4)
479+
; GLOBAL-NEXT: xsmulsp 1, 1, 0
480+
; GLOBAL-NEXT: xsmaddasp 2, 1, 0
481+
; GLOBAL-NEXT: xsmulsp 0, 1, 3
482+
; GLOBAL-NEXT: xsmulsp 0, 0, 2
483+
; GLOBAL-NEXT: .LBB13_2:
484+
; GLOBAL-NEXT: fmr 1, 0
370485
; GLOBAL-NEXT: blr
371486
%rt = call fast float @llvm.sqrt.f32(float %x)
372487
ret float %rt
@@ -387,21 +502,21 @@ define double @fcmp_nnan(double %a, double %y, double %z) {
387502
; FMF: # %bb.0:
388503
; FMF-NEXT: xxlxor 0, 0, 0
389504
; FMF-NEXT: xscmpudp 0, 1, 0
390-
; FMF-NEXT: blt 0, .LBB12_2
505+
; FMF-NEXT: blt 0, .LBB14_2
391506
; FMF-NEXT: # %bb.1:
392507
; FMF-NEXT: fmr 3, 2
393-
; FMF-NEXT: .LBB12_2:
508+
; FMF-NEXT: .LBB14_2:
394509
; FMF-NEXT: fmr 1, 3
395510
; FMF-NEXT: blr
396511
;
397512
; GLOBAL-LABEL: fcmp_nnan:
398513
; GLOBAL: # %bb.0:
399514
; GLOBAL-NEXT: xxlxor 0, 0, 0
400515
; GLOBAL-NEXT: xscmpudp 0, 1, 0
401-
; GLOBAL-NEXT: blt 0, .LBB12_2
516+
; GLOBAL-NEXT: blt 0, .LBB14_2
402517
; GLOBAL-NEXT: # %bb.1:
403518
; GLOBAL-NEXT: fmr 3, 2
404-
; GLOBAL-NEXT: .LBB12_2:
519+
; GLOBAL-NEXT: .LBB14_2:
405520
; GLOBAL-NEXT: fmr 1, 3
406521
; GLOBAL-NEXT: blr
407522
%cmp = fcmp nnan ult double %a, 0.0
@@ -477,3 +592,5 @@ define float @fneg_fsub_nozeros_1(float %x, float %y, float %z) {
477592
ret float %add
478593
}
479594

595+
attributes #0 = { "denormal-fp-math"="ieee,ieee" }
596+
attributes #1 = { "denormal-fp-math"="preserve-sign,preserve-sign" }

llvm/test/CodeGen/PowerPC/qpx-recipest.ll

Lines changed: 90 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ entry:
300300
ret <4 x float> %r
301301
}
302302

303-
define <4 x double> @foo3_fmf(<4 x double> %a) nounwind {
304-
; CHECK-LABEL: foo3_fmf:
303+
define <4 x double> @foo3_fmf_denorm_on(<4 x double> %a) #0 {
304+
; CHECK-LABEL: foo3_fmf_denorm_on:
305305
; CHECK: # %bb.0: # %entry
306306
; CHECK-NEXT: addis 3, 2, .LCPI12_0@toc@ha
307307
; CHECK-NEXT: qvfrsqrte 0, 1
@@ -317,6 +317,36 @@ define <4 x double> @foo3_fmf(<4 x double> %a) nounwind {
317317
; CHECK-NEXT: qvfnmsub 2, 4, 3, 2
318318
; CHECK-NEXT: qvfmul 0, 0, 2
319319
; CHECK-NEXT: qvlfdx 2, 0, 3
320+
; CHECK-NEXT: addis 3, 2, .LCPI12_2@toc@ha
321+
; CHECK-NEXT: addi 3, 3, .LCPI12_2@toc@l
322+
; CHECK-NEXT: qvlfdx 3, 0, 3
323+
; CHECK-NEXT: qvfmul 0, 0, 1
324+
; CHECK-NEXT: qvfabs 1, 1
325+
; CHECK-NEXT: qvfcmplt 1, 1, 2
326+
; CHECK-NEXT: qvfsel 1, 1, 3, 0
327+
; CHECK-NEXT: blr
328+
entry:
329+
%r = call fast <4 x double> @llvm.sqrt.v4f64(<4 x double> %a)
330+
ret <4 x double> %r
331+
}
332+
333+
define <4 x double> @foo3_fmf_denorm_off(<4 x double> %a) #1 {
334+
; CHECK-LABEL: foo3_fmf_denorm_off:
335+
; CHECK: # %bb.0: # %entry
336+
; CHECK-NEXT: addis 3, 2, .LCPI13_0@toc@ha
337+
; CHECK-NEXT: qvfrsqrte 0, 1
338+
; CHECK-NEXT: addi 3, 3, .LCPI13_0@toc@l
339+
; CHECK-NEXT: qvlfdx 2, 0, 3
340+
; CHECK-NEXT: addis 3, 2, .LCPI13_1@toc@ha
341+
; CHECK-NEXT: addi 3, 3, .LCPI13_1@toc@l
342+
; CHECK-NEXT: qvfmul 3, 0, 0
343+
; CHECK-NEXT: qvfmsub 4, 1, 2, 1
344+
; CHECK-NEXT: qvfnmsub 3, 4, 3, 2
345+
; CHECK-NEXT: qvfmul 0, 0, 3
346+
; CHECK-NEXT: qvfmul 3, 0, 0
347+
; CHECK-NEXT: qvfnmsub 2, 4, 3, 2
348+
; CHECK-NEXT: qvfmul 0, 0, 2
349+
; CHECK-NEXT: qvlfdx 2, 0, 3
320350
; CHECK-NEXT: qvfmul 0, 0, 1
321351
; CHECK-NEXT: qvfcmpeq 1, 1, 2
322352
; CHECK-NEXT: qvfsel 1, 1, 2, 0
@@ -326,8 +356,8 @@ entry:
326356
ret <4 x double> %r
327357
}
328358

329-
define <4 x double> @foo3_safe(<4 x double> %a) nounwind {
330-
; CHECK-LABEL: foo3_safe:
359+
define <4 x double> @foo3_safe_denorm_on(<4 x double> %a) #0 {
360+
; CHECK-LABEL: foo3_safe_denorm_on:
331361
; CHECK: # %bb.0: # %entry
332362
; CHECK-NEXT: qvesplati 2, 1, 3
333363
; CHECK-NEXT: qvesplati 3, 1, 2
@@ -347,15 +377,63 @@ entry:
347377
ret <4 x double> %r
348378
}
349379

350-
define <4 x float> @goo3_fmf(<4 x float> %a) nounwind {
351-
; CHECK-LABEL: goo3_fmf:
380+
define <4 x double> @foo3_safe_denorm_off(<4 x double> %a) #1 {
381+
; CHECK-LABEL: foo3_safe_denorm_off:
382+
; CHECK: # %bb.0: # %entry
383+
; CHECK-NEXT: qvesplati 2, 1, 3
384+
; CHECK-NEXT: qvesplati 3, 1, 2
385+
; CHECK-NEXT: fsqrt 4, 1
386+
; CHECK-NEXT: qvesplati 1, 1, 1
387+
; CHECK-NEXT: fsqrt 2, 2
388+
; CHECK-NEXT: fsqrt 3, 3
389+
; CHECK-NEXT: fsqrt 1, 1
390+
; CHECK-NEXT: qvgpci 0, 275
391+
; CHECK-NEXT: qvfperm 2, 3, 2, 0
392+
; CHECK-NEXT: qvfperm 0, 4, 1, 0
393+
; CHECK-NEXT: qvgpci 1, 101
394+
; CHECK-NEXT: qvfperm 1, 0, 2, 1
395+
; CHECK-NEXT: blr
396+
entry:
397+
%r = call <4 x double> @llvm.sqrt.v4f64(<4 x double> %a)
398+
ret <4 x double> %r
399+
}
400+
401+
define <4 x float> @goo3_fmf_denorm_on(<4 x float> %a) #0 {
402+
; CHECK-LABEL: goo3_fmf_denorm_on:
403+
; CHECK: # %bb.0: # %entry
404+
; CHECK-NEXT: addis 3, 2, .LCPI16_1@toc@ha
405+
; CHECK-NEXT: qvfrsqrtes 2, 1
406+
; CHECK-NEXT: addi 3, 3, .LCPI16_1@toc@l
407+
; CHECK-NEXT: qvlfsx 0, 0, 3
408+
; CHECK-NEXT: addis 3, 2, .LCPI16_0@toc@ha
409+
; CHECK-NEXT: addi 3, 3, .LCPI16_0@toc@l
410+
; CHECK-NEXT: qvfmuls 4, 2, 2
411+
; CHECK-NEXT: qvfnmsubs 3, 1, 0, 1
412+
; CHECK-NEXT: qvfmadds 0, 3, 4, 0
413+
; CHECK-NEXT: qvlfsx 3, 0, 3
414+
; CHECK-NEXT: addis 3, 2, .LCPI16_2@toc@ha
415+
; CHECK-NEXT: addi 3, 3, .LCPI16_2@toc@l
416+
; CHECK-NEXT: qvlfsx 4, 0, 3
417+
; CHECK-NEXT: qvfmuls 0, 2, 0
418+
; CHECK-NEXT: qvfabs 2, 1
419+
; CHECK-NEXT: qvfmuls 0, 0, 1
420+
; CHECK-NEXT: qvfcmplt 1, 2, 3
421+
; CHECK-NEXT: qvfsel 1, 1, 4, 0
422+
; CHECK-NEXT: blr
423+
entry:
424+
%r = call fast <4 x float> @llvm.sqrt.v4f32(<4 x float> %a)
425+
ret <4 x float> %r
426+
}
427+
428+
define <4 x float> @goo3_fmf_denorm_off(<4 x float> %a) #1 {
429+
; CHECK-LABEL: goo3_fmf_denorm_off:
352430
; CHECK: # %bb.0: # %entry
353-
; CHECK-NEXT: addis 3, 2, .LCPI14_1@toc@ha
431+
; CHECK-NEXT: addis 3, 2, .LCPI17_1@toc@ha
354432
; CHECK-NEXT: qvfrsqrtes 2, 1
355-
; CHECK-NEXT: addi 3, 3, .LCPI14_1@toc@l
433+
; CHECK-NEXT: addi 3, 3, .LCPI17_1@toc@l
356434
; CHECK-NEXT: qvlfsx 0, 0, 3
357-
; CHECK-NEXT: addis 3, 2, .LCPI14_0@toc@ha
358-
; CHECK-NEXT: addi 3, 3, .LCPI14_0@toc@l
435+
; CHECK-NEXT: addis 3, 2, .LCPI17_0@toc@ha
436+
; CHECK-NEXT: addi 3, 3, .LCPI17_0@toc@l
359437
; CHECK-NEXT: qvfmuls 4, 2, 2
360438
; CHECK-NEXT: qvfnmsubs 3, 1, 0, 1
361439
; CHECK-NEXT: qvfmadds 0, 3, 4, 0
@@ -391,3 +469,5 @@ entry:
391469
ret <4 x float> %r
392470
}
393471

472+
attributes #0 = { nounwind "denormal-fp-math"="ieee,ieee" }
473+
attributes #1 = { nounwind "denormal-fp-math"="preserve-sign,preserve-sign" }

llvm/test/CodeGen/PowerPC/recipest.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ define float @goo3_safe(float %a) nounwind {
292292
ret float %r
293293
}
294294

295-
define <4 x float> @hoo3_fmf(<4 x float> %a) nounwind {
295+
define <4 x float> @hoo3_fmf(<4 x float> %a) #1 {
296296
; CHECK: @hoo3_fmf
297297
; CHECK: vrsqrtefp
298298
; CHECK-DAG: vcmpeqfp
@@ -309,3 +309,4 @@ define <4 x float> @hoo3_safe(<4 x float> %a) nounwind {
309309
}
310310

311311
attributes #0 = { nounwind "reciprocal-estimates"="sqrtf:0,sqrtd:0" }
312+
attributes #1 = { nounwind "denormal-fp-math"="preserve-sign,preserve-sign" }

0 commit comments

Comments
 (0)