summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-07-10 14:02:02 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-07-10 14:02:02 +0000
commitf4ebfa3ae143e67c9e3f83aa657b828eb7632f08 (patch)
tree604a2907de239a7ff1373f1a012499c8a8206b3c /llvm/test
parentb9a52814bf80e64583b13a137ed4a7768b2fa460 (diff)
downloadbcm5719-llvm-f4ebfa3ae143e67c9e3f83aa657b828eb7632f08.tar.gz
bcm5719-llvm-f4ebfa3ae143e67c9e3f83aa657b828eb7632f08.zip
[InstSimplify] Fold away ord/uno fcmps when nnan is present.
This is important to fold away the slow case of complex multiplies emitted by clang. llvm-svn: 241911
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/InstSimplify/floating-point-compare.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstSimplify/floating-point-compare.ll b/llvm/test/Transforms/InstSimplify/floating-point-compare.ll
index af48d062b4f..8174f583453 100644
--- a/llvm/test/Transforms/InstSimplify/floating-point-compare.ll
+++ b/llvm/test/Transforms/InstSimplify/floating-point-compare.ll
@@ -58,3 +58,18 @@ define i1 @orderedLessZeroPowi(double,double) {
ret i1 %olt
}
+define i1 @nonans1(double %in1, double %in2) {
+ %cmp = fcmp nnan uno double %in1, %in2
+ ret i1 %cmp
+
+; CHECK-LABEL: @nonans1
+; CHECK-NEXT: ret i1 false
+}
+
+define i1 @nonans2(double %in1, double %in2) {
+ %cmp = fcmp nnan ord double %in1, %in2
+ ret i1 %cmp
+
+; CHECK-LABEL: @nonans2
+; CHECK-NEXT: ret i1 true
+}
OpenPOWER on IntegriCloud