[all-commits] [llvm/llvm-project] 24d764: [ARM] Transform a floating-point to fixed-point co...

Sam Tebbs via All-commits all-commits at lists.llvm.org
Thu Jul 1 07:11:59 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 24d76419d6b7a3191ec1f4bfc33a640e716f11c8
      https://github.com/llvm/llvm-project/commit/24d76419d6b7a3191ec1f4bfc33a640e716f11c8
  Author: Sam Tebbs <samuel.tebbs at arm.com>
  Date:   2021-07-01 (Thu, 01 Jul 2021)

  Changed paths:
    M llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
    A llvm/test/CodeGen/Thumb2/mve-vcvt-fixed-to-float.ll
    R llvm/test/CodeGen/Thumb2/mve-vcvt-fixed.ll
    A llvm/test/CodeGen/Thumb2/mve-vcvt-float-to-fixed.ll

  Log Message:
  -----------
  [ARM] Transform a floating-point to fixed-point conversion to a VCVT_fix

Much like fixed-point to floating-point conversion, the converse can
also be transformed into a fixed-point VCVT. This patch transforms
multiplications of floating point numbers by 2^n into a VCVT_fix. The
exception is that a float to fixed conversion with 1 fractional bit
ends up being an FADD (FADD(x, x) emulates FMUL(x, 2)) rather than an FMUL so there is a special case for that. This patch also moves the code from https://reviews.llvm.org/D103903 into a separate function as fixed to float and float to fixed are very similar.

Differential Revision: https://reviews.llvm.org/D104793




More information about the All-commits mailing list