[llvm] [AArch64] Refactor redundant PTEST optimisations (NFC) (PR #87802)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 6 10:26:38 PDT 2024


https://github.com/paulwalker-arm commented:

If you can remove the non-relevant loop vectorisation commit then I'll review the PR properly.

Broadly it looks good but perhaps it's just me but seeing `return {true, 0};` and `return {true, 0};` looks weird despite understanding their meaning.

What do you think to `canRemovePTestInstr` returning `std::optional<unsigned>` with the failure cases returning `nullopt` and positive cases returning a real opcode, be that `PredOpcode` or `convertToFlagSettingOpc(PredOpcode)` depending on whether an opcode replacement is necessary?

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


More information about the llvm-commits mailing list