[all-commits] [llvm/llvm-project] f87a09: Add lowering of STRICT_FSETCC and STRICT_FSETCCS

john-brawn-arm via All-commits all-commits at lists.llvm.org
Tue Feb 18 07:55:13 PST 2020


  Branch: refs/heads/release/10.x
  Home:   https://github.com/llvm/llvm-project
  Commit: f87a0929c6bd59750e424d06581507cdfd439a56
      https://github.com/llvm/llvm-project/commit/f87a0929c6bd59750e424d06581507cdfd439a56
  Author: John Brawn <john.brawn at arm.com>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.h
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td
    A llvm/test/CodeGen/AArch64/fp-intrinsics.ll

  Log Message:
  -----------
  Add lowering of STRICT_FSETCC and STRICT_FSETCCS

These become STRICT_FCMP and STRICT_FCMPE, which then get selected to the
corresponding FCMP and FCMPE instructions, though the handling from there on
isn't fully correct as we don't model reads and writes to FPCR and FPSR.

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

(cherry picked from commit 2224407ef5baf6100fa22420feb4d25af1a9493f)


  Commit: a97c77ad17502cc634473dc5ad433905f5d80b2f
      https://github.com/llvm/llvm-project/commit/a97c77ad17502cc634473dc5ad433905f5d80b2f
  Author: John Brawn <john.brawn at arm.com>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/lib/Target/AArch64/AArch64InstrFormats.td
    M llvm/test/CodeGen/AArch64/fp-intrinsics.ll

  Log Message:
  -----------
  [FPEnv][AArch64] Add lowering and instruction selection for STRICT_FP_ROUND

This gets selected to the appropriate fcvt instruction. Handling from there on
isn't fully correct yet, as we need to model fcvt reading and writing to fpsr
and fpcr.

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

(cherry picked from commit 258d8dd76afd88a12539b182a53ff21dcba16a2d)


  Commit: fca6c5e5dbf283b9e96b4a6ba8d343ff5dd91328
      https://github.com/llvm/llvm-project/commit/fca6c5e5dbf283b9e96b4a6ba8d343ff5dd91328
  Author: John Brawn <john.brawn at arm.com>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td
    M llvm/test/CodeGen/AArch64/fp-intrinsics.ll
    M llvm/test/CodeGen/AArch64/fpconv-vector-op-scalarize-strict.ll

  Log Message:
  -----------
  [FPEnv][AArch64] Add lowering and instruction selection for strict conversions

Strict fp-to-int and int-to-fp conversions can be handled in the same way that
the non-strict versions are (by using the appropriate instruction or converting
to a function call when we have no instruction).

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

(cherry picked from commit 0bb9a27c9895c0fbc3f55f56ad7f1e1927398fce)


  Commit: 19f4aa2d0ad68b99155582f28f0dfe2406c8fe32
      https://github.com/llvm/llvm-project/commit/19f4aa2d0ad68b99155582f28f0dfe2406c8fe32
  Author: John Brawn <john.brawn at arm.com>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M llvm/lib/Target/ARM/ARMISelLowering.cpp
    M llvm/lib/Target/ARM/ARMISelLowering.h
    M llvm/lib/Target/ARM/ARMInstrVFP.td
    M llvm/test/CodeGen/ARM/fp-intrinsics.ll

  Log Message:
  -----------
  [FPEnv][ARM] Add lowering of STRICT_FSETCC and STRICT_FSETCCS

These can be lowered to code sequences using CMPFP and CMPFPE which then get
selected to VCMP and VCMPE. The implementation isn't fully correct, as the chain
operand isn't handled correctly, but resolving that looks like it would involve
changes around FPSCR-handling instructions and how the FPSCR is modelled.

The fp-intrinsics test was already testing some of this but as the entire test
was being XFAILed it wasn't noticed. Un-XFAIL the test and instead leave the
cases where we aren't generating the right instruction sequences as FIXME.

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

(cherry picked from commit b37d59353f699e99f139a9227a6a69964ef4b132)


  Commit: cff417cffd61d2c4607eb142e272ec10ebec2c21
      https://github.com/llvm/llvm-project/commit/cff417cffd61d2c4607eb142e272ec10ebec2c21
  Author: John Brawn <john.brawn at arm.com>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/test/CodeGen/AArch64/fp-intrinsics.ll

  Log Message:
  -----------
  [FPEnv][AArch64] Add lowering of f128 STRICT_FSETCC

These get lowered to function calls, like the non-strict versions.

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

(cherry picked from commit 68cf574857c81f711f498a479855a17e7bea40f7)


  Commit: cbac41966b8f9356a3e69c050b60770108550d1e
      https://github.com/llvm/llvm-project/commit/cbac41966b8f9356a3e69c050b60770108550d1e
  Author: John Brawn <john.brawn at arm.com>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M llvm/lib/Target/ARM/ARMISelLowering.cpp
    M llvm/test/CodeGen/ARM/fp-intrinsics.ll

  Log Message:
  -----------
  [ARM] Fix infinite loop when lowering STRICT_FP_EXTEND

If the target has FP64 but not FP16 then we have custom lowering for FP_EXTEND
and STRICT_FP_EXTEND with type f64. However if the extend is from f32 to f64 the
current implementation will cause in infinite loop for STRICT_FP_EXTEND due to
emitting a merge_values of the original node which after replacement becomes a
merge_values of itself.

Fix this by not doing anything for f32 to f64 extend when we have FP64, though
for STRICT_FP_EXTEND we have to do the strict-to-nonstrict mutation as that
doesn't happen automatically for opcodes with custom lowering.

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

(cherry picked from commit 0ec57972967dfb43fc022c2e3788be041d1db730)


  Commit: b5d9a7e72fafaead89f0cc8994925c90ed3169be
      https://github.com/llvm/llvm-project/commit/b5d9a7e72fafaead89f0cc8994925c90ed3169be
  Author: Diogo Sampaio <diogo.sampaio at arm.com>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
    A llvm/test/CodeGen/AArch64/strict-fp-int-promote.ll

  Log Message:
  -----------
  [AArch64][FPenv] Update chain of int to fp conversion

Summary:
When using strict fp, it is required to update the
chain when performing integer type promotion of a
operand to a integer to floating point conversion.

Reviewers: craig.topper, john.brawn

Reviewed By: craig.topper

Subscribers: kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

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

(cherry picked from commit 8bc790f9e6a6fc6d8fe8f41a7120269366fa0957)


  Commit: f636e9feb9f0969e3b563d3140db5a0faa1e30d8
      https://github.com/llvm/llvm-project/commit/f636e9feb9f0969e3b563d3140db5a0faa1e30d8
  Author: John Brawn <john.brawn at arm.com>
  Date:   2020-02-18 (Tue, 18 Feb 2020)

  Changed paths:
    M llvm/lib/Target/ARM/ARMISelLowering.cpp
    M llvm/test/CodeGen/ARM/fp-intrinsics.ll

  Log Message:
  -----------
  [FPEnv][ARM] Don't call mutateStrictFPToFP when lowering

mutateStrictFPToFP can delete the node and replace it with another with the same
value which can later cause problems, and returning the result of
mutateStrictFPToFP doesn't work because SelectionDAGLegalize expects that the
returned value has the same number of results as the original. Instead handle
things by doing the mutation manually.

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

(cherry picked from commit 594a89f7270da74c89f2321432bc6a7135773fa5)


Compare: https://github.com/llvm/llvm-project/compare/4f53867ec27b...f636e9feb9f0


More information about the All-commits mailing list