[llvm] [GlobalISel] Match G_CONSTANT from GIM_CheckLiteralInt (PR #161527)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 1 08:14:21 PDT 2025


arsenm wrote:

I don't think this should be necessary. Directly inline constants have a separate matcher, and specifically correspond to TargetConstant, not Constant.

> This means that certain patterns, unlike SDAG, will not match on the constant.

This sounds more like a bug somewhere. DAG tablegen is unfortunately too permissive with using the wrong imm/timm matcher. We should make it stricter to help with this 

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


More information about the llvm-commits mailing list