[all-commits] [llvm/llvm-project] 17ac26: [AArch64][SVE] NFC: Add tests for masked FP arith ...

Cullen Rhodes via All-commits all-commits at lists.llvm.org
Mon Aug 8 01:45:03 PDT 2022


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

  Changed paths:
    M llvm/test/CodeGen/AArch64/sve-fp-combine.ll

  Log Message:
  -----------
  [AArch64][SVE] NFC: Add tests for masked FP arith patterns (D130564)


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

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
    M llvm/test/CodeGen/AArch64/sve-fp-combine.ll

  Log Message:
  -----------
  [AArch64][SVE] Add patterns to select masked FP arith

Add patterns to select predicated instructions when lowering:

  fadd(a, select(mask, b, splat(0)))
  fsub(a, select(mask, b, splat(0)))

'fadd' is unsafe unless no-signed zeros fast-math flag is set, since

  -0.0 + 0.0 = 0.0

changes the sign. Alive2: https://alive2.llvm.org/ce/z/wbhJh_

Also adds FMA patterns for:

  fadd(a, select(mask, mul(b, c), splat(0))) -> fmla(a, mask, b, c)
  fsub(a, select(mask, mul(b, c), splat(0))) -> fmla(a, mask, b, c)

These patterns require the 'contract' fast-math flag to be set, and the
fadd 'nsz' as above.

Reviewed By: paulwalker-arm

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


Compare: https://github.com/llvm/llvm-project/compare/e3ef7295ed5d...a6dec9f5b284


More information about the All-commits mailing list