summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/and-fcmp.ll
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-04-12 21:56:23 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-04-12 21:56:23 +0000
commit6ac927860610d134f2a35119abff6eb2d81846a1 (patch)
tree654dd8ca899627dcaee95553f6fb25ea7698b551 /test/Transforms/InstCombine/and-fcmp.ll
parenta74f91e44cd9df787081304235d34c89ac642652 (diff)
downloadllvm-6ac927860610d134f2a35119abff6eb2d81846a1.tar.gz
llvm-6ac927860610d134f2a35119abff6eb2d81846a1.tar.bz2
llvm-6ac927860610d134f2a35119abff6eb2d81846a1.tar.xz
InstCombine: Check the operand types before merging fcmp ord & fcmp ord.
Fixes PR15737. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179417 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/and-fcmp.ll')
-rw-r--r--test/Transforms/InstCombine/and-fcmp.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/and-fcmp.ll b/test/Transforms/InstCombine/and-fcmp.ll
index 40c44c09a8..a398307f86 100644
--- a/test/Transforms/InstCombine/and-fcmp.ll
+++ b/test/Transforms/InstCombine/and-fcmp.ll
@@ -77,3 +77,24 @@ define zeroext i8 @t7(float %x, float %y) nounwind {
; CHECK: fcmp uno
; CHECK-NOT: fcmp ult
}
+
+; PR15737
+define i1 @t8(float %a, double %b) {
+ %cmp = fcmp ord float %a, 0.000000e+00
+ %cmp1 = fcmp ord double %b, 0.000000e+00
+ %and = and i1 %cmp, %cmp1
+ ret i1 %and
+; CHECK: t8
+; CHECK: fcmp ord
+; CHECK: fcmp ord
+}
+
+define <2 x i1> @t9(<2 x float> %a, <2 x double> %b) {
+ %cmp = fcmp ord <2 x float> %a, zeroinitializer
+ %cmp1 = fcmp ord <2 x double> %b, zeroinitializer
+ %and = and <2 x i1> %cmp, %cmp1
+ ret <2 x i1> %and
+; CHECK: t9
+; CHECK: fcmp ord
+; CHECK: fcmp ord
+}