[llvm-commits] [llvm] r168656 - in /llvm/trunk: 0007-Fast-math-test-for-SimplifyInstruction-fold-multiply.patch test/Transforms/InstSimplify/fast-math.ll

Michael Ilseman milseman at apple.com
Mon Nov 26 17:00:23 PST 2012


Author: milseman
Date: Mon Nov 26 19:00:22 2012
New Revision: 168656

URL: http://llvm.org/viewvc/llvm-project?rev=168656&view=rev
Log:
Fast-math test for SimplifyInstruction: fold multiply by 0

Applied the patch, rather than committing it.


Added:
    llvm/trunk/test/Transforms/InstSimplify/fast-math.ll
Removed:
    llvm/trunk/0007-Fast-math-test-for-SimplifyInstruction-fold-multiply.patch

Removed: llvm/trunk/0007-Fast-math-test-for-SimplifyInstruction-fold-multiply.patch
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/0007-Fast-math-test-for-SimplifyInstruction-fold-multiply.patch?rev=168655&view=auto
==============================================================================
--- llvm/trunk/0007-Fast-math-test-for-SimplifyInstruction-fold-multiply.patch (original)
+++ llvm/trunk/0007-Fast-math-test-for-SimplifyInstruction-fold-multiply.patch (removed)
@@ -1,55 +0,0 @@
-From a3d62a84e2805fc54fe721610de350cf23469aa4 Mon Sep 17 00:00:00 2001
-From: Michael Ilseman <milseman at apple.com>
-Date: Thu, 15 Nov 2012 10:04:58 -0800
-Subject: [PATCH 7/8] Fast-math test for SimplifyInstruction: fold multiply by
- 0
-
----
- test/Transforms/InstSimplify/fast-math.ll | 35 +++++++++++++++++++++++++++++++
- 1 file changed, 35 insertions(+)
- create mode 100644 test/Transforms/InstSimplify/fast-math.ll
-
-diff --git a/test/Transforms/InstSimplify/fast-math.ll b/test/Transforms/InstSimplify/fast-math.ll
-new file mode 100644
-index 0000000..e4b3ea3
---- /dev/null
-+++ b/test/Transforms/InstSimplify/fast-math.ll
-@@ -0,0 +1,35 @@
-+; RUN: opt < %s -instsimplify -S | FileCheck %s
-+
-+;; x * 0 ==> 0 when no-nans and no-signed-zero
-+; CHECK: mul_zero_1
-+define float @mul_zero_1(float %a) {
-+  %b = fmul nsz nnan float %a, 0.0
-+; CHECK: ret float 0.0
-+  ret float %b
-+}
-+; CHECK: mul_zero_2
-+define float @mul_zero_2(float %a) {
-+  %b = fmul fast float 0.0, %a
-+; CHECK: ret float 0.0
-+  ret float %b
-+}
-+
-+;; x * 0 =/=> 0 when there could be nans or -0
-+; CHECK: no_mul_zero_1
-+define float @no_mul_zero_1(float %a) {
-+  %b = fmul nsz float %a, 0.0
-+; CHECK: ret float %b
-+  ret float %b
-+}
-+; CHECK: no_mul_zero_2
-+define float @no_mul_zero_2(float %a) {
-+  %b = fmul nnan float %a, 0.0
-+; CHECK: ret float %b
-+  ret float %b
-+}
-+; CHECK: no_mul_zero_3
-+define float @no_mul_zero_3(float %a) {
-+  %b = fmul float %a, 0.0
-+; CHECK: ret float %b
-+  ret float %b
-+}
--- 
-1.7.12.2 (Apple Git-36)
-

Added: llvm/trunk/test/Transforms/InstSimplify/fast-math.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstSimplify/fast-math.ll?rev=168656&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/InstSimplify/fast-math.ll (added)
+++ llvm/trunk/test/Transforms/InstSimplify/fast-math.ll Mon Nov 26 19:00:22 2012
@@ -0,0 +1,35 @@
+; RUN: opt < %s -instsimplify -S | FileCheck %s
+
+;; x * 0 ==> 0 when no-nans and no-signed-zero
+; CHECK: mul_zero_1
+define float @mul_zero_1(float %a) {
+  %b = fmul nsz nnan float %a, 0.0
+; CHECK: ret float 0.0
+  ret float %b
+}
+; CHECK: mul_zero_2
+define float @mul_zero_2(float %a) {
+  %b = fmul fast float 0.0, %a
+; CHECK: ret float 0.0
+  ret float %b
+}
+
+;; x * 0 =/=> 0 when there could be nans or -0
+; CHECK: no_mul_zero_1
+define float @no_mul_zero_1(float %a) {
+  %b = fmul nsz float %a, 0.0
+; CHECK: ret float %b
+  ret float %b
+}
+; CHECK: no_mul_zero_2
+define float @no_mul_zero_2(float %a) {
+  %b = fmul nnan float %a, 0.0
+; CHECK: ret float %b
+  ret float %b
+}
+; CHECK: no_mul_zero_3
+define float @no_mul_zero_3(float %a) {
+  %b = fmul float %a, 0.0
+; CHECK: ret float %b
+  ret float %b
+}





More information about the llvm-commits mailing list