[PATCH] D88785: Support {S,U}REMEqFold before legalization
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 31 09:58:37 PDT 2021
craig.topper added inline comments.
================
Comment at: llvm/test/CodeGen/RISCV/rvv/vmulh-sdnode-rv32.ll:5
; Test that the prepareSREMEqFold optimization doesn't crash on scalable
; vector types. RVV doesn't have ROTR or ROTL operations so the optimization
; itself doesn't kick in.
----------------
Is this comment wrong now? Certainly seems like something is kicking in now.
================
Comment at: llvm/test/CodeGen/RISCV/rvv/vmulh-sdnode-rv32.ll:16
+; CHECK-NEXT: vmv.v.i v26, 1
+; CHECK-NEXT: vrsub.vi v27, v26, 0
+; CHECK-NEXT: vand.vi v27, v27, 7
----------------
Something silly happened here. The vrsub.vi+vmv.vi appears to be calculating -1 without constant folding. Probably DAG combine not constant folding scalable vectors?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88785/new/
https://reviews.llvm.org/D88785
More information about the llvm-commits
mailing list