1; RUN: opt -S -reassociate < %s | FileCheck %s 2 3define void @test1() { 4; CHECK-LABEL: @test1( 5; CHECK-NEXT: [[T1:%.*]] = tail call <4 x float> @blam() 6; 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]] 7; CHECK-NEXT: [[T24:%.*]] = fadd fast <4 x float> [[T1_NEG]], fadd (<4 x float> undef, <4 x float> undef) 8; CHECK-NEXT: tail call void @wombat(<4 x float> [[T24]]) 9; CHECK-NEXT: ret void 10; 11 %t1 = tail call <4 x float> @blam() 12 %t23 = fsub fast <4 x float> undef, %t1 13 %t24 = fadd fast <4 x float> %t23, undef 14 tail call void @wombat(<4 x float> %t24) 15 ret void 16} 17 18define half @test2() { 19; CHECK-LABEL: @test2( 20; CHECK-NEXT: [[T15:%.*]] = fsub fast half undef, undef 21; CHECK-NEXT: [[T15_NEG:%.*]] = fsub fast half 0xH8000, [[T15]] 22; CHECK-NEXT: [[T18:%.*]] = fadd fast half [[T15_NEG]], fadd (half undef, half undef) 23; CHECK-NEXT: ret half [[T18]] 24; 25 %t15 = fsub fast half undef, undef 26 %t17 = fsub fast half undef, %t15 27 %t18 = fadd fast half undef, %t17 28 ret half %t18 29} 30 31 32 33; Function Attrs: optsize 34declare <4 x float> @blam() 35 36; Function Attrs: optsize 37declare void @wombat(<4 x float>) 38 39