1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -instcombine -S | FileCheck %s
6 define float @fneg_op0(float %x, float %y) {
7 ; CHECK-LABEL: @fneg_op0(
8 ; CHECK-NEXT: [[ADD:%.*]] = fsub float [[Y:%.*]], [[X:%.*]]
9 ; CHECK-NEXT: ret float [[ADD]]
11 %neg = fsub float -0.0, %x
12 %add = fadd float %neg, %y
18 define float @fneg_op1(float %x, float %y) {
19 ; CHECK-LABEL: @fneg_op1(
20 ; CHECK-NEXT: [[ADD:%.*]] = fsub float [[X:%.*]], [[Y:%.*]]
21 ; CHECK-NEXT: ret float [[ADD]]
23 %neg = fsub float -0.0, %y
24 %add = fadd float %x, %neg