mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:19:43 +00:00
[NFC] [PowerPC] Add FMA flag propagation test
This commit is contained in:
parent
042179924b
commit
f85832972d
@ -239,4 +239,26 @@ define double @getNegatedExpression_crash(double %x, double %y) {
|
||||
%fma1 = call reassoc nsz double @llvm.fma.f64(double %fma, double %y, double %add)
|
||||
ret double %fma1
|
||||
}
|
||||
|
||||
define double @fma_flag_propagation(double %a) {
|
||||
; CHECK-FAST-LABEL: fma_flag_propagation:
|
||||
; CHECK-FAST: # %bb.0: # %entry
|
||||
; CHECK-FAST-NEXT: xssubdp 1, 1, 1
|
||||
; CHECK-FAST-NEXT: blr
|
||||
;
|
||||
; CHECK-FAST-NOVSX-LABEL: fma_flag_propagation:
|
||||
; CHECK-FAST-NOVSX: # %bb.0: # %entry
|
||||
; CHECK-FAST-NOVSX-NEXT: fsub 1, 1, 1
|
||||
; CHECK-FAST-NOVSX-NEXT: blr
|
||||
;
|
||||
; CHECK-LABEL: fma_flag_propagation:
|
||||
; CHECK: # %bb.0: # %entry
|
||||
; CHECK-NEXT: xssubdp 1, 1, 1
|
||||
; CHECK-NEXT: blr
|
||||
entry:
|
||||
%0 = fneg double %a
|
||||
%1 = call reassoc nnan double @llvm.fma.f64(double %0, double 1.0, double %a)
|
||||
ret double %1
|
||||
}
|
||||
|
||||
declare double @llvm.fma.f64(double, double, double) nounwind readnone
|
||||
|
Loading…
Reference in New Issue
Block a user