diff options
Diffstat (limited to 'test/Transforms/Reassociate/fp-commute.ll')
-rw-r--r-- | test/Transforms/Reassociate/fp-commute.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Transforms/Reassociate/fp-commute.ll b/test/Transforms/Reassociate/fp-commute.ll new file mode 100644 index 0000000..025689b --- /dev/null +++ b/test/Transforms/Reassociate/fp-commute.ll @@ -0,0 +1,18 @@ +; RUN: opt -reassociate -S < %s | FileCheck %s + +target triple = "armv7-apple-ios" + +declare void @use(float) + +; CHECK: test +define void @test(float %x, float %y) { +entry: +; CHECK: fmul float %x, %y +; CHECK: fmul float %x, %y + %0 = fmul float %x, %y + %1 = fmul float %y, %x + %2 = fsub float %0, %1 + call void @use(float %0) + call void @use(float %2) + ret void +} |