[PATCH] D50553: [X86] Add constant folding for AVX512 versions of scalar floating point to integer conversion intrinsics.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 9 23:47:42 PDT 2018


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel, chandlerc.

We've supported constant folding for sse versions for many years. This patch adds support for the avx512 versions including unsigned with the default rounding mode. We could probably do more with other roundings modes and SAE in the future.

The test cases are largely based on the sse.ll test cases. But I did add some test cases to ensure the unsigned versions don't accept negative values. Also checked the bounds of f64->i32 conversions to make sure unsigned has a larger positive range than signed.


Repository:
  rL LLVM

https://reviews.llvm.org/D50553

Files:
  lib/Analysis/ConstantFolding.cpp
  test/Transforms/ConstProp/avx512.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50553.160064.patch
Type: text/x-patch
Size: 26902 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180810/9de7f353/attachment.bin>


More information about the llvm-commits mailing list