[PATCH] D146627: [RISCV] Combine (vrgather src, vid) -> vmerge

Luke Lau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 22 06:11:04 PDT 2023


luke added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/rvv/combine-gather.ll:11
 ; CHECK-NEXT:    vsetivli zero, 8, e8, mf2, ta, mu
-; CHECK-NEXT:    vid.v v11
-; CHECK-NEXT:    vrgather.vv v10, v8, v11
+; CHECK-NEXT:    vadd.vi v8, v8, 0
 ; CHECK-NEXT:    li a0, 240
----------------
The vmerge gets folded away at the pseudo instruction stage: https://reviews.llvm.org/D133255#inline-1283170

Perhaps the easiest thing to do here is just check for an all ones mask in this combine


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146627



More information about the llvm-commits mailing list