[PATCH] D72814: [AArch64][GlobalISel] Change G_FCONSTANTs feeding into stores into G_CONSTANTS

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 11:39:35 PST 2020


paquette added a comment.

> When we go through gpr, there might be fp immediate values which cannot be represented with a single instruction GPR register materialization, instead requiring movk/movz.

I don't think that we can ever actually hit this situation.

In AArch64AddressingModes.h:

  /// getFP32Imm - Return an 8-bit floating-point version of the 32-bit
  /// floating-point value. If the value cannot be represented as an 8-bit
  /// floating-point value, then return -1.
  ...
  /// getFP64Imm - Return an 8-bit floating-point version of the 64-bit
  /// floating-point value. If the value cannot be represented as an 8-bit
  /// floating-point value, then return -1.

The range of legal floating point values for fmov is much smaller than the range of legal values we can pack into a mov. So, I don't think a case where we can avoid two movs by using fmov actually exists.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72814/new/

https://reviews.llvm.org/D72814





More information about the llvm-commits mailing list