[llvm] [Tablegen] Support Operand in morphing patterns (PR #99645)
Serge Pavlov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 22 10:54:53 PDT 2024
================
@@ -294,6 +294,12 @@ void MatcherGen::EmitLeafMatchCode(const TreePatternNode &N) {
return;
}
+ if (LeafRec->isSubClassOf("Operand")) {
----------------
spavloff wrote:
`timm` depends on target register size. Things like rounding mode are groups of bits unrelated to that size. It can create problems in pattern matching,
The rounding mode could be recognized early, during building DAG, and converted into `frmarg`. In this case `frmarg` should be allowed to appear in the input part of patterns.
Of course, the problem of pattern matching can be solved by using custom lowering.
https://github.com/llvm/llvm-project/pull/99645
More information about the llvm-commits
mailing list