[PATCH] D71968: [X86] Re-enable lowerUINT_TO_FP_vXi32 under fast-math by using an FSUB instead of an FADD.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 28 16:57:12 PST 2019


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel, scanon.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

We previously disabled this under fast math due to aggressive
reassociation by the machine combiner. But I think we can work
around this by using a FSUB instead of FADD for the first
operation.

This matches the similar algorithm we do for uint_to_fp i64->f64
in TargetLowering::expandUINT_TO_FP. If reassociation hasn't
been a problem for that, hopefully its not a problem here.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71968

Files:
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/X86/ftrunc.ll
  llvm/test/CodeGen/X86/known-bits-vector.ll
  llvm/test/CodeGen/X86/vec-strict-inttofp-128.ll
  llvm/test/CodeGen/X86/vec-strict-inttofp-256.ll
  llvm/test/CodeGen/X86/vec_int_to_fp.ll
  llvm/test/CodeGen/X86/vec_uint_to_fp-fastmath.ll
  llvm/test/CodeGen/X86/vec_uint_to_fp.ll
  llvm/test/CodeGen/X86/vector-constrained-fp-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71968.235494.patch
Type: text/x-patch
Size: 35812 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191229/da4ecb02/attachment.bin>


More information about the llvm-commits mailing list