[PATCH] D24343: [X86][SSE] Improve recognition of uitofp conversions that can be performed as sitofp

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 8 06:27:10 PDT 2016


RKSimon created this revision.
RKSimon added reviewers: eli.friedman, delena, zvi, andreadb, spatel.
RKSimon added a subscriber: llvm-commits.
RKSimon set the repository for this revision to rL LLVM.

With D24253 we can now use SelectionDAG::SignBitIsZero with vector operations.

This patch uses SelectionDAG::SignBitIsZero to recognise that a zero sign bit means that we can use a sitofp instead of a uitofp (which is not directly support on pre-AVX512 hardware).

While AVX512 does provide support for uitofp, the conversion to sitofp should not cause any regressions.

Repository:
  rL LLVM

https://reviews.llvm.org/D24343

Files:
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/avx512-cvt.ll
  test/CodeGen/X86/i64-to-float.ll
  test/CodeGen/X86/uint_to_fp-3.ll
  test/CodeGen/X86/vec_int_to_fp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24343.70692.patch
Type: text/x-patch
Size: 43279 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160908/c8604b5a/attachment.bin>


More information about the llvm-commits mailing list