aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFrits van Bommel <fvbommel@gmail.com>2011-01-29 15:26:31 +0000
committerFrits van Bommel <fvbommel@gmail.com>2011-01-29 15:26:31 +0000
commit1fca2c32cc99197215d3fd32a4ad05214c74edd1 (patch)
tree9f358ce4aed7f898391854c5310aa5a6aaaf68ee /test
parent9136782d273cd45b6f19a7d0cc0d146d0791bac9 (diff)
Move InstCombine's knowledge of fdiv to SimplifyInstruction().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124534 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/InstSimplify/fdiv.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Transforms/InstSimplify/fdiv.ll b/test/Transforms/InstSimplify/fdiv.ll
new file mode 100644
index 0000000000..9d85154b24
--- /dev/null
+++ b/test/Transforms/InstSimplify/fdiv.ll
@@ -0,0 +1,17 @@
+; RUN: opt < %s -instsimplify -S | FileCheck %s
+
+define double @fdiv_of_undef(double %X) {
+; CHECK: @fdiv_of_undef
+; undef / X -> undef
+ %r = fdiv double undef, %X
+ ret double %r
+; CHECK: ret double undef
+}
+
+define double @fdiv_by_undef(double %X) {
+; CHECK: @fdiv_by_undef
+; X / undef -> undef
+ %r = fdiv double %X, undef
+ ret double %r
+; CHECK: ret double undef
+}