[PATCH] D121449: [AArch64] Combine ISD::SETCC into AArch64ISD::ANDS

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 11 01:14:52 PST 2022


bcl5980 created this revision.
bcl5980 added reviewers: SjoerdMeijer, samtebbs, jaykang10, david-arm, paulwalker-arm, t.p.northover, sdesmalen.
bcl5980 added a project: Backend.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
bcl5980 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When N > 12,  (2^N -1) is not a legal add immediate (isLegalAddImmediate will return false).
ANd if SetCC input use this number, DAG combiner will generate one more SRL instruction.
This change use TST to optimize the case.

Fix #54283


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121449

Files:
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/test/CodeGen/AArch64/arm64-xaluo.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121449.414607.patch
Type: text/x-patch
Size: 4590 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220311/0cb44474/attachment.bin>


More information about the llvm-commits mailing list