[llvm] [RISCV][GISEL] Legalize and post-legalize lower G_INSERT_SUBVECTOR (PR #108859)

Thorsten Schütt via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 18 09:52:53 PDT 2024


tschuett wrote:

I stated before: the odd thing about the lower passes: they are free-standing functions. There is no CombinerHelper and no access to LegalizerInfo.
In the combiner, we have the pattern:
```
if (!isLegal(op))
  return false;
build(Op);
```

The lowering combines cannot really fail. How about:
```
assert(isLegal(Op) && "unexpected"):
build(Op);
```

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


More information about the llvm-commits mailing list