[PATCH] D131786: [ARM] Support all versions of AND, ORR, EOR and BIC in optimizeCompareInstr

Filipp Zhinkin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 6 11:29:22 PDT 2022


fzhinkin created this revision.
Herald added subscribers: dmgreen, hiraditya, kristof.beyls.
Herald added a project: All.
fzhinkin updated this revision to Diff 452280.
fzhinkin added a comment.
fzhinkin updated this revision to Diff 454477.
fzhinkin updated this revision to Diff 458184.
fzhinkin updated this revision to Diff 458193.
fzhinkin edited the summary of this revision.
fzhinkin added reviewers: dmgreen, SjoerdMeijer.
fzhinkin updated this revision to Diff 458225.
fzhinkin added a comment.
fzhinkin published this revision for review.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Supported shifts


fzhinkin added a comment.

Added tests on zero comparison for equality.


fzhinkin added a comment.

Rebase


fzhinkin added a comment.

Built stage2 binaries and executed clang and llvm tests, all passed: F24440281: build.log.bz2 <https://reviews.llvm.org/F24440281>


fzhinkin added a comment.

Rebase



================
Comment at: llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp:3009
   case ARM::t2LSLri:
   case ARM::t2LSLrr:
     return true;
----------------
Didn't support shifts as it seems very unlikely to see these instructions here.


================
Comment at: llvm/test/CodeGen/ARM/cmp-peephole.ll:6
+
+define i1 @cmp_ne_zero_and_rr(i32 %a, i32 %b) {
+; ARM-LABEL: cmp_ne_zero_and_rr:
----------------
I'll precommit new tests if there will be no objections.


Combine cmp with zero and all versions of AND, ORR, EOR and BIC instructions into S-suffixed versions.

Related issue: https://github.com/llvm/llvm-project/issues/57122


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131786

Files:
  llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
  llvm/lib/Target/ARM/ARMInstrInfo.td
  llvm/test/CodeGen/ARM/branch-on-zero.ll
  llvm/test/CodeGen/ARM/cmp-peephole.ll
  llvm/test/CodeGen/ARM/consthoist-icmpimm.ll
  llvm/test/CodeGen/ARM/hoist-and-by-const-from-lshr-in-eqcmp-zero.ll
  llvm/test/CodeGen/ARM/icmp-shift-opt.ll
  llvm/test/CodeGen/ARM/sadd_sat.ll
  llvm/test/CodeGen/ARM/sadd_sat_plus.ll
  llvm/test/CodeGen/ARM/sat-to-bitop.ll
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/arm_cmplx_dot_prod_f32.ll
  llvm/test/CodeGen/Thumb2/mve-laneinterleaving.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131786.458225.patch
Type: text/x-patch
Size: 46771 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220906/fcdcd1a6/attachment.bin>


More information about the llvm-commits mailing list