[PATCH] D88785: Support {S,U}REMEqFold before legalization
Simonas Kazlauskas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 31 12:45:23 PDT 2021
nagisa 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.
----------------
craig.topper wrote:
> Is this comment wrong now? Certainly seems like something is kicking in now.
Yeah, looks like you're right. I think only the last sentence went wrong, though. The test is still testing that `prepareSREMEqFold` is not crashing… I think.
================
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
----------------
craig.topper wrote:
> 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?
Should I look into this? Seems somewhat out of scope for this diff. Should I file an issue instead?
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