1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=reassociate -S | FileCheck %s
5 define float @test1(float %arg, float %arg1, float %arg2, float %arg3) {
7 ; CHECK-NEXT: [[TMP5:%.*]] = fneg fast float [[ARG:%.*]]
8 ; CHECK-NEXT: [[TMP1:%.*]] = fsub fast float [[ARG3:%.*]], [[ARG2:%.*]]
9 ; CHECK-NEXT: [[TMP2_NEG:%.*]] = fadd fast float [[TMP5]], 5.000000e+02
10 ; CHECK-NEXT: [[TMP3:%.*]] = fadd fast float [[TMP2_NEG]], [[TMP1]]
11 ; CHECK-NEXT: [[TMP4:%.*]] = fmul fast float [[TMP3]], [[TMP3]]
12 ; CHECK-NEXT: [[TMP6:%.*]] = fdiv fast float [[TMP5]], [[ARG1:%.*]]
13 ; CHECK-NEXT: [[TMP7:%.*]] = fadd fast float [[TMP4]], [[TMP6]]
14 ; CHECK-NEXT: ret float [[TMP7]]
16 %tmp1 = fsub fast float %arg3, %arg2
17 %tmp2 = fadd fast float %arg, -5.000000e+02
18 %tmp3 = fsub fast float %tmp1, %tmp2
19 %tmp4 = fmul fast float %tmp3, %tmp3
20 %tmp5 = fneg fast float %arg
21 %tmp6 = fdiv fast float %tmp5, %arg1
22 %tmp7 = fadd fast float %tmp6, %tmp4