blob: 025689bb0c103f15abafb1136cf346d0f08d4f6f [file] [log] [blame]
Owen Anderson423f19f2012-05-07 20:47:23 +00001; RUN: opt -reassociate -S < %s | FileCheck %s
2
3target triple = "armv7-apple-ios"
4
Duncan Sandsb9335862012-06-06 14:53:10 +00005declare void @use(float)
6
Owen Anderson423f19f2012-05-07 20:47:23 +00007; CHECK: test
Duncan Sandsb9335862012-06-06 14:53:10 +00008define void @test(float %x, float %y) {
Owen Anderson423f19f2012-05-07 20:47:23 +00009entry:
10; CHECK: fmul float %x, %y
11; CHECK: fmul float %x, %y
12 %0 = fmul float %x, %y
13 %1 = fmul float %y, %x
14 %2 = fsub float %0, %1
Duncan Sandsb9335862012-06-06 14:53:10 +000015 call void @use(float %0)
16 call void @use(float %2)
17 ret void
Owen Anderson423f19f2012-05-07 20:47:23 +000018}