[PATCH] D72906: [X86] Improve X86 cmpps/cmppd/cmpss/cmpsd intrinsics with strictfp

Andy Kaylor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 29 13:13:08 PST 2020


andrew.w.kaylor accepted this revision.
andrew.w.kaylor added a comment.
This revision is now accepted and ready to land.

lgtm

I have a couple of comments, but nothing that couldn't be addressed in a later patch.



================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:12363
+        Cmp = Builder.CreateFCmp(Pred, Ops[0], Ops[1]);
       return EmitX86MaskedCompareResult(*this, Cmp, NumElts, Ops[3]);
     }
----------------
How hard would it be to generate a select with known safe values ahead of the compare in the constrained case? 


================
Comment at: clang/test/CodeGen/avx-builtins-constrained.c:170
+  // CHECK-LABEL: test_mm256_cmp_pd_false_os
+  // CHECK: call <4 x double> @llvm.x86.avx.cmp.pd.256(<4 x double> %{{.*}}, <4 x double> %{{.*}}, i8 27)
+  return _mm256_cmp_pd(a, b, _CMP_FALSE_OS);
----------------
Does this have the strictfp attribute here? I don't think we do anything with that, but it will likely be useful when we start handling strictfp for target-specific intrinsics.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72906/new/

https://reviews.llvm.org/D72906





More information about the llvm-commits mailing list