Commit dfcbf78
committed
[VPlan] Assign custom opcodes to recipes not mapping to IR opcodes.
We can perform CSE on recipes that do not directly map to Instruction
opcodes. One example is VPVectorPointerRecipe. Currently this is handled
by supporting them in ::canHandle, but currently that means that we
return std::nullopt from getOpcodeOrIntrinsicID() for it. This currently
only works, because the only case we return std::nullopt and perform CSE
is VPVectorPointerRecipe. But that does not work if we support more such
recipes, like VPPredInstPHIRecipe
(llvm#162110).
To fix this, return a custom opcode from getOpcodeOrIntrinsicID for
recipes like VPVectorPointerRecipe, using the VPDefID after all regular
instruction opcodes.1 parent 646bc09 commit dfcbf78
2 files changed
+12
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1064 | 1064 | | |
1065 | 1065 | | |
1066 | 1066 | | |
| 1067 | + | |
1067 | 1068 | | |
1068 | 1069 | | |
1069 | 1070 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1982 | 1982 | | |
1983 | 1983 | | |
1984 | 1984 | | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
1985 | 1992 | | |
1986 | 1993 | | |
1987 | 1994 | | |
| |||
2005 | 2012 | | |
2006 | 2013 | | |
2007 | 2014 | | |
2008 | | - | |
2009 | | - | |
2010 | | - | |
2011 | | - | |
2012 | | - | |
| 2015 | + | |
2013 | 2016 | | |
| 2017 | + | |
2014 | 2018 | | |
2015 | 2019 | | |
2016 | 2020 | | |
| |||
2048 | 2052 | | |
2049 | 2053 | | |
2050 | 2054 | | |
| 2055 | + | |
| 2056 | + | |
2051 | 2057 | | |
2052 | 2058 | | |
2053 | 2059 | | |
| |||
0 commit comments