[X86] Remove special validation for INT immediate operand from AsmParser. Instead...
[oota-llvm.git] / test / CodeGen / X86 / dag-fmf-cse.ll
1 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=fma -enable-unsafe-fp-math -enable-fmf-dag=1 | FileCheck %s
2
3 ; If fast-math-flags are propagated correctly, the mul1 expression
4 ; should be recognized as a factor in the last fsub, so we should
5 ; see a mul and add, not a mul and fma:
6 ; a * b - (-a * b) ---> (a * b) + (a * b)
7
8 define float @fmf_should_not_break_cse(float %a, float %b) {
9 ; CHECK-LABEL: fmf_should_not_break_cse:
10 ; CHECK:       # BB#0:
11 ; CHECK-NEXT:    vmulss %xmm1, %xmm0, %xmm0
12 ; CHECK-NEXT:    vaddss %xmm0, %xmm0, %xmm0
13 ; CHECK-NEXT:    retq
14
15   %mul1 = fmul fast float %a, %b
16   %nega = fsub fast float 0.0, %a
17   %mul2 = fmul fast float %nega, %b
18   %abx2 = fsub fast float %mul1, %mul2
19   ret float %abx2
20 }
21