[llvm] [RISCV] Move RISCVInsertVSETVLI to after phi elimination (PR #91440)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 23:53:26 PDT 2024


lukel97 wrote:

> I think I see what happened here. InitUndef is replacing undef/noreg/implicit_def operands with well defined sources, and we're no longer considering them to have a undef passthrough.

ProcessImplicitDefs should run after InitUndef and add back the undef flag though, otherwise RISCVInsertVSETVLI would never consider any passthrus as undef.

> Can we plausible move InitUndef to just after the new placement here?

I think so, moving it to after PHI elimination might explain some of those diffs. But it's also probably worth mentioning that InitUndef has to run before regalloc by design, which is at odds with moving RISCVInsertVSETVLI after regalloc. So eventually we'll have to move RISCVInsertVSETVLI past InitUndef.

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


More information about the llvm-commits mailing list