[llvm] r327335 - [InstSimplify] add fcmp tests for constant NaN vector with undef elt; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 12 14:44:17 PDT 2018


Author: spatel
Date: Mon Mar 12 14:44:17 2018
New Revision: 327335

URL: http://llvm.org/viewvc/llvm-project?rev=327335&view=rev
Log:
[InstSimplify] add fcmp tests for constant NaN vector with undef elt; NFC

Modified:
    llvm/trunk/test/Transforms/InstSimplify/floating-point-compare.ll

Modified: llvm/trunk/test/Transforms/InstSimplify/floating-point-compare.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstSimplify/floating-point-compare.ll?rev=327335&r1=327334&r2=327335&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstSimplify/floating-point-compare.ll (original)
+++ llvm/trunk/test/Transforms/InstSimplify/floating-point-compare.ll Mon Mar 12 14:44:17 2018
@@ -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> @orderedCompareWithNaNVe
   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
+}
+




More information about the llvm-commits mailing list