[PATCH] D67212: [x86] Adding support for some missing intrinsics: _castf32_u32, _castf64_u64, _castu32_f32, _castu64_f64

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 14:45:09 PDT 2019


craig.topper added inline comments.


================
Comment at: clang/lib/Headers/ia32intrin.h:207
+_castf64_u64(double __Bits) {
+  unsigned long long D;
+  __builtin_memcpy(&D, &__Bits, sizeof(__Bits));
----------------
RKSimon wrote:
> Shouldn't the unsigned long long cases be hidden by __x86_64__ wrappers?
icc doesn't restrict this to 64-bit targets. On 64-bit targets it corresponds to movq, but on other targets we can just lower to a 64-bit store and two 32-bit loads in the worst case.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D67212





More information about the llvm-commits mailing list