When combining COPY instructions, we were replacing the destination registers
with the source register without checking register constraints. This patch adds
a simple logic to check if the constraints match before replacing registers.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp | ||
---|---|---|
87 | Do we want this method to also handle the case of Regclass to Regclass copies (without any LLTs)? If yes, looks like this early exits. |
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp | ||
---|---|---|
87 | I added support for it as it's currently possible to create a register without an LLT attached, but I'm not sure if it's something we want to support in GlobalISel. What do you all think? |
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp | ||
---|---|---|
87 | Thanks. This looks good to me. |
Do we want this method to also handle the case of Regclass to Regclass copies (without any LLTs)? If yes, looks like this early exits.