[llvm] [PowerPC] Optimize select_cc with VSX compare and xxsel (PR #65295)

Qiu Chaofan via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 3 23:29:50 PST 2023


ecnelises wrote:

In previous plan, this patch adds patterns for `xxsel` and `xscmp(eq|ge|gt)(s|d)p`. I revised to make it a combine, because:

1. The instruction does not touch CR, we can't use it to lower SETCC. It seems `SETCC` and `SELECT_CC` share table of `setCondCodeAction`. Implementing it in legaliztion requires large change to existing `SETCC` handling.
2. The ideal `select_cc f32/f64/f128 ...` pattern won't appear in isel, instead, they are transformed in legalization and hand coded isel.
3. Implementing in `Select()` cannot fallback easily if target CPU doesn't meet requirement.

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


More information about the llvm-commits mailing list