[InstSimplify] add fcmp tests for constant NaN vector with undef elt; NFC
authorSanjay Patel <spatel@rotateright.com>
Mon, 12 Mar 2018 21:44:17 +0000 (21:44 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 12 Mar 2018 21:44:17 +0000 (21:44 +0000)
llvm-svn: 327335

llvm/test/Transforms/InstSimplify/floating-point-compare.ll

index a440829..219bb18 100644 (file)
@@ -1,4 +1,4 @@
-; NOTE: Assertions have been autogenerated by update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt < %s -instsimplify -S | FileCheck %s
 
 ; Infinity
@@ -354,3 +354,21 @@ define <2 x i1> @orderedCompareWithNaNVector(<2 x double> %A) {
   ret <2 x i1> %cmp
 }
 
+define <2 x i1> @orderedCompareWithNaNVector_undef_elt(<2 x double> %A) {
+; CHECK-LABEL: @orderedCompareWithNaNVector_undef_elt(
+; CHECK-NEXT:    [[CMP:%.*]] = fcmp olt <2 x double> [[A:%.*]], <double 0xFFFFFFFFFFFFFFFF, double undef>
+; CHECK-NEXT:    ret <2 x i1> [[CMP]]
+;
+  %cmp = fcmp olt <2 x double> %A, <double 0xFFFFFFFFFFFFFFFF, double undef>
+  ret <2 x i1> %cmp
+}
+
+define <2 x i1> @unorderedCompareWithNaNVector_undef_elt(<2 x double> %A) {
+; CHECK-LABEL: @unorderedCompareWithNaNVector_undef_elt(
+; CHECK-NEXT:    [[CMP:%.*]] = fcmp ult <2 x double> [[A:%.*]], <double undef, double 0xFFFFFFFFFFFFFFFF>
+; CHECK-NEXT:    ret <2 x i1> [[CMP]]
+;
+  %cmp = fcmp ult <2 x double> %A, <double undef, double 0xFFFFFFFFFFFFFFFF>
+  ret <2 x i1> %cmp
+}
+