1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -reassociate < %s | FileCheck %s
6 ; CHECK-NEXT: [[T1:%.*]] = tail call <4 x float> @blam()
7 ; CHECK-NEXT: [[T1_NEG:%.*]] = fsub fast <4 x float> <float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00>, [[T1]]
8 ; CHECK-NEXT: [[T24:%.*]] = fadd fast <4 x float> [[T1_NEG]], undef
9 ; CHECK-NEXT: tail call void @wombat(<4 x float> [[T24]])
10 ; CHECK-NEXT: ret void
12 %t1 = tail call <4 x float> @blam()
13 %t23 = fsub fast <4 x float> undef, %t1
14 %t24 = fadd fast <4 x float> %t23, undef
15 tail call void @wombat(<4 x float> %t24)
19 define half @test2() {
20 ; CHECK-LABEL: @test2(
21 ; CHECK-NEXT: [[T15:%.*]] = fsub fast half undef, undef
22 ; CHECK-NEXT: [[T15_NEG:%.*]] = fsub fast half 0xH8000, [[T15]]
23 ; CHECK-NEXT: [[T18:%.*]] = fadd fast half [[T15_NEG]], undef
24 ; CHECK-NEXT: ret half [[T18]]
26 %t15 = fsub fast half undef, undef
27 %t17 = fsub fast half undef, %t15
28 %t18 = fadd fast half undef, %t17
34 ; Function Attrs: optsize
35 declare <4 x float> @blam()
37 ; Function Attrs: optsize
38 declare void @wombat(<4 x float>)