Commit 9bb0eed
authored
[VPlan] Assign custom opcodes to recipes not mapping to IR opcodes. (llvm#162267)
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.
PR: llvm#1622671 parent 946238e commit 9bb0eed
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 | |
|---|---|---|---|
| |||
1991 | 1991 | | |
1992 | 1992 | | |
1993 | 1993 | | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
1994 | 2001 | | |
1995 | 2002 | | |
1996 | 2003 | | |
| |||
2014 | 2021 | | |
2015 | 2022 | | |
2016 | 2023 | | |
2017 | | - | |
2018 | | - | |
2019 | | - | |
2020 | | - | |
2021 | | - | |
| 2024 | + | |
| 2025 | + | |
2022 | 2026 | | |
2023 | 2027 | | |
2024 | 2028 | | |
| |||
2057 | 2061 | | |
2058 | 2062 | | |
2059 | 2063 | | |
| 2064 | + | |
| 2065 | + | |
2060 | 2066 | | |
2061 | 2067 | | |
2062 | 2068 | | |
| |||
0 commit comments