[all-commits] [llvm/llvm-project] 6537ea: [LoongArch] Add patterns to support `[x]vadda.{b/h...

ZhaoQi via All-commits all-commits at lists.llvm.org
Thu Sep 25 02:35:54 PDT 2025


  Branch: refs/heads/users/zhaoqi5/vec-adda
  Home:   https://github.com/llvm/llvm-project
  Commit: 6537eae0f0948cad69196364b252f2a61c4ff250
      https://github.com/llvm/llvm-project/commit/6537eae0f0948cad69196364b252f2a61c4ff250
  Author: Qi Zhao <zhaoqi01 at loongson.cn>
  Date:   2025-09-25 (Thu, 25 Sep 2025)

  Changed paths:
    M llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
    M llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td
    M llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td
    A llvm/test/CodeGen/LoongArch/lasx/abs.ll
    M llvm/test/CodeGen/LoongArch/lasx/ir-instruction/adda.ll
    A llvm/test/CodeGen/LoongArch/lsx/abs.ll
    M llvm/test/CodeGen/LoongArch/lsx/ir-instruction/adda.ll

  Log Message:
  -----------
  [LoongArch] Add patterns to support `[x]vadda.{b/h/w/d}` generation

This commit add patterns for lsx and lasx to support generating
`[x]vadda.{b/h/w/d}` instructions.

Note: For convenience, this commit also set `ISD::ABS` as legal.
As shown in the tests, this brings no change to the results,
just same as the results obtained from expanding it before.
But, setting it as legal brings more vectorization opportunities
to IR transformation which may bring more vector optimization
chances for later stages and the backend.



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