https://llvm.org/bugs/show_bug.cgi?id=31630

            Bug ID: 31630
           Summary: Use AVX-512 packed instructions for scalar FP<->64-bit
                    integer conversions on x86
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedb...@nondot.org
          Reporter: david.l.kreit...@intel.com
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

The scalar FP<->64-bit integer conversions are only available for 64-bit
targets, but the packed AVX-512 versions can be used in lieu of the x87
sequences we are currently using in all the following cases. When converting in
the fp->int direction, we should take care to blend in safe values for the
upper elements, zero being the obvious choice.

Compile as "clang -m32 -O2 -S -march=skx" to reproduce.

#include <stdint.h>
uint64_t f1(double x) {
  return x;
}
double f2(uint64_t x) {
  return x;
}
int64_t f3(double x) {
  return x;
}
double f4(int64_t x) {
  return x;
}
uint64_t f5(float x) {
  return x;
}
float f6(uint64_t x) {
  return x;
}
int64_t f7(float x) {
  return x;
}
float f8(int64_t x) {
  return x;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to