[AArch64] add test for fsub+fneg; NFC

D72015 proposes to restrict the current behavior.
This commit is contained in:
Sanjay Patel 2019-12-31 10:25:41 -05:00
parent 108645cd0a
commit e6bdecf1cd
1 changed files with 16 additions and 0 deletions

View File

@ -34,3 +34,19 @@ define double @negation_propagation(double* %arg, double %arg1, double %arg2) {
%t18 = fadd double %t16, %t7
ret double %t18
}
define { double, double } @testfn(double %x, double %y) #0 {
; CHECK-LABEL: testfn:
; CHECK: // %bb.0:
; CHECK-NEXT: fsub d2, d0, d1
; CHECK-NEXT: fsub d1, d1, d0
; CHECK-NEXT: mov v0.16b, v2.16b
; CHECK-NEXT: ret
%sub = fsub fast double %x, %y
%neg = fneg fast double %sub
%r0 = insertvalue { double, double } undef, double %sub, 0
%r1 = insertvalue { double, double } %r0, double %neg, 1
ret { double, double } %r1
}
attributes #0 = { "no-signed-zeros-fp-math"="true" }