[llvm] [CodeGen] Avoid sinking vector comparisons during CodeGenPrepare (PR #113158)

David Green via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 10 06:08:40 PST 2024


davemgreen wrote:

I believe it is less about the number of uses and more about the type legalization of the uses. v4i1 gets legalized to v4i16, which will insert xtn and sshll if the original instructions were v4i32. The cross-basic block nature makes it difficult for DAG to deal with. If the uses are extracts then the problem is lessened as extracts can always use the type it sees.

I gave it a test though and it seemed OK, so LGTM. We might want to look at removing the legalization artefacts too.

https://github.com/llvm/llvm-project/pull/113158


More information about the llvm-commits mailing list