[AArch64][NFC]Refactor 'isBitfieldPositioningOp' so that DAG nodes with different...
authorMingming Liu <mingmingl@google.com>
Thu, 13 Oct 2022 00:49:04 +0000 (17:49 -0700)
committerMingming Liu <mingmingl@google.com>
Mon, 17 Oct 2022 15:08:48 +0000 (08:08 -0700)
commit45cadb4bd36b479dfc4daff451a6c924703ec7e0
tree7bc8aeb01072dd0bb3821823f8d645653fa73566
parent4b6447e220fd86d5e45461d4d00593fb91e10880
[AArch64][NFC]Refactor 'isBitfieldPositioningOp' so that DAG nodes with different Opcode are handled with separate helper functions.

Using different helper functions for DAG nodes with different Opcode allows specialization.

- 'isBitfieldExtractOp' [1] shows how specialization based on Opcode could catch more patterns.
- The refactor paves the way (e.g., makes diff clearer) for enhancement in {D135844,D135850,D135852}

[1] https://github.com/llvm/llvm-project/blob/cbd8464595220b5ea76c70ac9965d84970c4b712/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp#L2163-L2202

Differential Revision: https://reviews.llvm.org/D135843
llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp