summaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstSimplify/fdiv.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstSimplify/fdiv.ll')
-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 0000000..9d85154
--- /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
+}
OpenPOWER on IntegriCloud