Commit ec61311
authored
[LLVM][TableGen] Support type casts of nodes with multiple results (#109728)
Currently, type casts can only be used to pattern match for intrinsics
with a single overloaded return value. For instance:
```
def int_foo : Intrinsic<[llvm_anyint_ty], []>;
def : Pat<(i32 (int_foo)), ...>;
```
This patch extends type casts to support matching intrinsics with
multiple overloaded return values. As an example, the following defines
a pattern that matches only if the overloaded intrinsic call returns an
`i16` for the first result and an `i32` for the second result:
```
def int_bar : Intrinsic<[llvm_anyint_ty, llvm_anyint_ty], []>;
def : Pat<([i16, i32] (int_bar)), ...>;
```1 parent 2da417e commit ec61311
File tree
4 files changed
+116
-12
lines changed- llvm
- lib/TableGen
- test/TableGen
- utils/TableGen/Common
4 files changed
+116
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2866 | 2866 | | |
2867 | 2867 | | |
2868 | 2868 | | |
2869 | | - | |
| 2869 | + | |
| 2870 | + | |
2870 | 2871 | | |
2871 | 2872 | | |
2872 | | - | |
2873 | | - | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
2874 | 2876 | | |
2875 | 2877 | | |
2876 | 2878 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2886 | 2886 | | |
2887 | 2887 | | |
2888 | 2888 | | |
| 2889 | + | |
| 2890 | + | |
| 2891 | + | |
| 2892 | + | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
| 2896 | + | |
| 2897 | + | |
| 2898 | + | |
| 2899 | + | |
| 2900 | + | |
| 2901 | + | |
| 2902 | + | |
| 2903 | + | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
2889 | 2918 | | |
2890 | 2919 | | |
2891 | 2920 | | |
| |||
2896 | 2925 | | |
2897 | 2926 | | |
2898 | 2927 | | |
2899 | | - | |
2900 | | - | |
| 2928 | + | |
2901 | 2929 | | |
2902 | | - | |
2903 | | - | |
| 2930 | + | |
| 2931 | + | |
2904 | 2932 | | |
2905 | 2933 | | |
2906 | | - | |
2907 | | - | |
2908 | 2934 | | |
2909 | 2935 | | |
2910 | 2936 | | |
2911 | | - | |
2912 | | - | |
2913 | 2937 | | |
2914 | 2938 | | |
2915 | 2939 | | |
| |||
4223 | 4247 | | |
4224 | 4248 | | |
4225 | 4249 | | |
4226 | | - | |
| 4250 | + | |
4227 | 4251 | | |
| 4252 | + | |
| 4253 | + | |
4228 | 4254 | | |
4229 | 4255 | | |
4230 | 4256 | | |
| |||
0 commit comments