[llvm] [GlobalISel][TableGen] Support for typed G_FCONSTANT Imm in MIR-patttern (PR #219563)
Vikash Gupta via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 01:01:39 PDT 2026
vg0204 wrote:
> Why does this need a custom operator? I'd hope you can just write this directly as the new constant instruction by its usual name
As I investigated further we do need something like GIReplaceRegWithConstant buitin type rule (to replace C++ replaceInstWithConstant), as direct G_CONSTANT can be used only in scalar scenario, as there could be case where the IMM need to splatted into a fixed-vector (DstType is Vector). So, we need GIReplaceRegWithConstant capable of handling both scalar/splatted vector case!
I will make a separate PR for that replacing both replaceInstWithConstant/replaceInstWithFConstant with their counter-part builtin rule type
@arsenm , @Pierre-vh does its sound right!
https://github.com/llvm/llvm-project/pull/219563
More information about the llvm-commits
mailing list