blob: f982cbb7f5e026580ea50a4d2656e83643516061 [file] [log] [blame]
Tim Northover820e0412014-05-02 17:25:02 +00001; RUN: llc -mtriple=arm64 -fp-contract=fast -o - %s | FileCheck %s
2
3
4; Make sure we don't try to fold an fneg into +0.0, creating an illegal constant
5; -0.0. It's also good, though not essential, that we don't resort to a litpool.
6define double @test_fms_fold(double %a, double %b) {
7; CHECK-LABEL: test_fms_fold:
8; CHECK: fmov {{d[0-9]+}}, xzr
9; CHECK: ret
10 %mul = fmul double %a, 0.000000e+00
11 %mul1 = fmul double %b, 0.000000e+00
12 %sub = fsub double %mul, %mul1
13 ret double %sub
14}