This repository was archived by the owner on Oct 11, 2025. It is now read-only.
Commit 541e8e7
authored
[mlir] Execute same operand name constraints before user constraints. (#162526)
For a pattern like this:
Pat<(MyOp $x, $x),
(...),
[(MyCheck $x)]>;
The old implementation generates:
Pat<(MyOp $x0, $x1),
(...),
[(MyCheck $x0),
($x0 == $x1)]>;
This is not very straightforward, because the $x name appears in the
source pattern; it's attempting to assume equality check will be
performed as part of the source pattern matching.
This commit moves the equality checks before the other constraints,
i.e.:
Pat<(MyOp $x0, $x1),
(...),
[($x0 == $x1),
(MyCheck $x0)]>;1 parent 2a33654 commit 541e8e7
1 file changed
Lines changed: 26 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1024 | 1024 | | |
1025 | 1025 | | |
1026 | 1026 | | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
1027 | 1053 | | |
1028 | 1054 | | |
1029 | 1055 | | |
| |||
1068 | 1094 | | |
1069 | 1095 | | |
1070 | 1096 | | |
1071 | | - | |
1072 | | - | |
1073 | | - | |
1074 | | - | |
1075 | | - | |
1076 | | - | |
1077 | | - | |
1078 | | - | |
1079 | | - | |
1080 | | - | |
1081 | | - | |
1082 | | - | |
1083 | | - | |
1084 | | - | |
1085 | | - | |
1086 | | - | |
1087 | | - | |
1088 | | - | |
1089 | | - | |
1090 | | - | |
1091 | | - | |
1092 | | - | |
1093 | | - | |
1094 | 1097 | | |
1095 | 1098 | | |
1096 | 1099 | | |
| |||
0 commit comments