• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -instcombine -S | FileCheck %s
2
3; PR4374
4define float @test1(float %a, float %b) nounwind {
5  %t1 = fsub float %a, %b
6  %t2 = fsub float -0.000000e+00, %t1
7
8; CHECK:       %t1 = fsub float %a, %b
9; CHECK-NEXT:  %t2 = fsub float -0.000000e+00, %t1
10
11  ret float %t2
12}
13
14; <rdar://problem/7530098>
15define double @test2(double %x, double %y) nounwind {
16  %t1 = fadd double %x, %y
17  %t2 = fsub double %x, %t1
18
19; CHECK:      %t1 = fadd double %x, %y
20; CHECK-NEXT: %t2 = fsub double %x, %t1
21
22  ret double %t2
23}
24