[all-commits] [llvm/llvm-project] 1d64fd: [ARM] Introduce intrinsics for MVE add/sub/mul und...

David Green via All-commits all-commits at lists.llvm.org
Mon Nov 24 23:30:18 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1d64fd5d42671d15ed8cd0fc31f71a4ad1e791b6
      https://github.com/llvm/llvm-project/commit/1d64fd5d42671d15ed8cd0fc31f71a4ad1e791b6
  Author: David Green <david.green at arm.com>
  Date:   2025-11-25 (Tue, 25 Nov 2025)

  Changed paths:
    M clang/include/clang/Basic/arm_mve_defs.td
    M clang/test/CodeGen/arm-mve-intrinsics/vaddq.c
    M clang/test/CodeGen/arm-mve-intrinsics/vmulq.c
    M clang/test/CodeGen/arm-mve-intrinsics/vsubq.c
    M clang/utils/TableGen/MveEmitter.cpp
    M llvm/include/llvm/IR/IntrinsicsARM.td
    M llvm/lib/Target/ARM/ARMInstrMVE.td
    A llvm/test/CodeGen/Thumb2/mve-intrinsics/strict-intrinsics.ll
    M llvm/test/CodeGen/Thumb2/mve-intrinsics/vabdq.ll
    M llvm/test/CodeGen/Thumb2/mve-pred-ext.ll

  Log Message:
  -----------
  [ARM] Introduce intrinsics for MVE add/sub/mul under strict-fp. (#169156)

As far as I understand, the MVE fp vadd/vsub/vmul instructions will set
exception flags in the same ways as scalar fadd/fsub/fmul, but will not
honor flush-to-zero (for f32 they always flush, for f16 they follows the
fpsrc flags) and will always use the default rounding mode.

This means that we cannot convert the vadd_f23/vsub_f32/vmul_f32
intrinsics to llvm.constrained.fadd/fsub/fmul and then vadd/vsub/vmul
without changing the expected behaviour under strict-fp. This patch
introduces a set in intrinsics that we can use instead, going from
vadd_f32 -> llvm.arm.mve.vadd -> MVE_VADD.

The current implementations assumes that the standard variant of a
strictfp alternative will be a IRBuilder, this can be changed to take a
IRBuilder or IRInt.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list