[all-commits] [llvm/llvm-project] cf3c6c: [AArch64][SME] Add predicate for NEON support in s...

Cullen Rhodes via All-commits all-commits at lists.llvm.org
Mon Aug 23 02:24:37 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cf3c6cca9fa5bedbefbcbdfdbcb89119a24c596c
      https://github.com/llvm/llvm-project/commit/cf3c6cca9fa5bedbefbcbdfdbcb89119a24c596c
  Author: Cullen Rhodes <cullen.rhodes at arm.com>
  Date:   2021-08-23 (Mon, 23 Aug 2021)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td

  Log Message:
  -----------
  [AArch64][SME] Add predicate for NEON support in streaming mode

Split out from D107903 to remove dependency for D108039 and D108279.

Reviewed By: paulwalker-arm

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


  Commit: fb82b836b738829a4f006f475723452cf6969280
      https://github.com/llvm/llvm-project/commit/fb82b836b738829a4f006f475723452cf6969280
  Author: Cullen Rhodes <cullen.rhodes at arm.com>
  Date:   2021-08-23 (Mon, 23 Aug 2021)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64InstrFormats.td
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td
    A llvm/test/MC/AArch64/SME/streaming-mode-neon-fp16.s
    A llvm/test/MC/AArch64/SME/streaming-mode-neon-negative.s
    A llvm/test/MC/AArch64/SME/streaming-mode-neon.s

  Log Message:
  -----------
  [AArch64][SME] Support NEON scalar FP instructions in streaming mode

The following scalar FP instructions are legal in streaming mode:

  0101 1110 xx1x xxxx 11x1 11xx xxxx xxxx # FMULX/FRECPS/FRSQRTS (scalar)
  0101 1110 x10x xxxx 00x1 11xx xxxx xxxx # FMULX/FRECPS/FRSQRTS (scalar, FP16)
  01x1 1110 1x10 0001 11x1 10xx xxxx xxxx # FRECPE/FRSQRTE/FRECPX (scalar)
  01x1 1110 1111 1001 11x1 10xx xxxx xxxx # FRECPE/FRSQRTE/FRECPX (scalar, FP16)

Predicate them on `HasNEONorStreamingSVE`. Full list of affected
instructions:

  FMULX16, FMULX32, FMULX64, FRECPS16, FRECPS32, FRECPS64, FRSQRTS16,
  FRSQRTS32, FRSQRTS64, FRECPEv1f16, FRECPEv1i32, FRECPEv1i64, FRECPXv1f16,
  FRECPXv1i32, FRECPXv1i64, FRSQRTEv1f16, FRSQRTEv1i32, FRSQRTEv1i64

Depends on D107902.

The reference can be found here:
https://developer.arm.com/documentation/ddi0602/2021-06/SIMD-FP-Instructions

Execution of NEON instructions that are illegal in streaming mode will
cause a trap or exception. Using FMULX [1] as an example, this check is
at the top of the pseudocode:

  if elements == 1 then
      CheckFPEnabled64();
  else
      CheckFPAdvSIMDEnabled64();

For the legal scalar variants it calls `CheckFPEnabled64`, whereas for the
illegal vector variants it calls `CheckFPAdvSIMDEnabled64` which traps.

This is useful for observing which instructions are/aren't legal
in streaming mode.

[1] https://developer.arm.com/documentation/ddi0602/2021-06/SIMD-FP-Instructions/FMULX--Floating-point-Multiply-extended-

Reviewed By: david-arm

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


Compare: https://github.com/llvm/llvm-project/compare/955b91c19c00...fb82b836b738


More information about the All-commits mailing list