[llvm] [RISCV][VLOPT] Don't reduce the VL is the same as CommonVL (PR #123878)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 22:57:39 PST 2025


wangpc-pp wrote:

> I don't think this is an infinite loop, but a pathologically slow case where the chain of instructions is really long. But pruning the worklist when the CommonVL is the same seems like a sensible way to manage it.

If so, I think we should add a list of handled instructions to remove duplicated instructions in:
https://github.com/llvm/llvm-project/blob/ebb27ccb08e0579825a53b218ff5b2ddc492626a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp#L1341-L1355
Just like:
https://github.com/llvm/llvm-project/blob/ebb27ccb08e0579825a53b218ff5b2ddc492626a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp#L15777-L15799

https://github.com/llvm/llvm-project/pull/123878


More information about the llvm-commits mailing list