blob: 5af3b1991c9e69ed226608b33a5ba6af48d83497 [file] [log] [blame]
Owen Anderson630077e2015-11-20 08:16:13 +00001; RUN: opt -S -reassociate < %s | FileCheck %s
2
3define void @test1() {
4; CHECK-LABEL: @test1
5; CHECK: call
6; CHECK: fsub
7; CHECK: fadd
8 %tmp = tail call <4 x float> @blam()
9 %tmp23 = fsub fast <4 x float> undef, %tmp
10 %tmp24 = fadd fast <4 x float> %tmp23, undef
11 tail call void @wombat(<4 x float> %tmp24)
12 ret void
13}
14
Owen Anderson8e851302015-11-20 22:34:48 +000015define half @test2() {
16; CHECK-LABEL: @test2
17; CHECK: fsub
18; CHECK: fsub
19; CHECK: fadd
20 %tmp15 = fsub fast half undef, undef
21 %tmp17 = fsub fast half undef, %tmp15
22 %tmp18 = fadd fast half undef, %tmp17
23 ret half %tmp18
24}
25
26
27
Owen Anderson630077e2015-11-20 08:16:13 +000028; Function Attrs: optsize
29declare <4 x float> @blam()
30
31; Function Attrs: optsize
32declare void @wombat(<4 x float>)
33