[PATCH] D81819: [PowerPC] Add InstAlias for those Rotate Instructions

Zhang Kang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 14 20:47:40 PDT 2020


ZhangKang created this revision.
ZhangKang added reviewers: efriedma, hfinkel, nemanjai, PowerPC.
ZhangKang added a project: LLVM.
Herald added subscribers: shchenz, wuzish, hiraditya, qcolombet.

For some simple InstAlias, we can implement it in td files. But for some complex InstAlias,
td can't implement it, we should implement those complex InstAlias it in PPCInstrPrinter.cpp.
For example:

  asm
  sldi ra,rs,n (n < 64)    <=====>     rldicr ra,rs,n,63-n

This patch will implement some complex InstAlias in PPCInstrPrinter.cpp for below instructions:

  RLDIMI: insrdi
  RLWIMI: inslwi, insrwi
  RLWINM: slwi srwi clrrwi clrlslwi extlwi extrwi
  RLDIC: clrlsldi
  RLDIC: srdi extrdi
  RLDICR: sldi clrrdi extldi


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81819

Files:
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp
  llvm/test/CodeGen/PowerPC/2006-11-10-DAGCombineMiscompile.ll
  llvm/test/CodeGen/PowerPC/CompareEliminationSpillIssue.ll
  llvm/test/CodeGen/PowerPC/Frames-dyn-alloca.ll
  llvm/test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll
  llvm/test/CodeGen/PowerPC/absol-jump-table-enabled.ll
  llvm/test/CodeGen/PowerPC/addegluecrash.ll
  llvm/test/CodeGen/PowerPC/addi-offset-fold.ll
  llvm/test/CodeGen/PowerPC/addze.ll
  llvm/test/CodeGen/PowerPC/aix-cc-byval-mem.ll
  llvm/test/CodeGen/PowerPC/aix-cc-byval.ll
  llvm/test/CodeGen/PowerPC/aix-lower-jump-table.ll
  llvm/test/CodeGen/PowerPC/and-mask.ll
  llvm/test/CodeGen/PowerPC/andc.ll
  llvm/test/CodeGen/PowerPC/anyext_srl.ll
  llvm/test/CodeGen/PowerPC/atomic-minmax.ll
  llvm/test/CodeGen/PowerPC/bitfieldinsert.ll
  llvm/test/CodeGen/PowerPC/bperm.ll
  llvm/test/CodeGen/PowerPC/bswap64.ll
  llvm/test/CodeGen/PowerPC/build-vector-tests.ll
  llvm/test/CodeGen/PowerPC/collapse-rotates.mir
  llvm/test/CodeGen/PowerPC/combine-setcc.ll
  llvm/test/CodeGen/PowerPC/convert-rr-to-ri-instrs-out-of-range.mir
  llvm/test/CodeGen/PowerPC/convert-rr-to-ri-instrs.mir
  llvm/test/CodeGen/PowerPC/expand-isel.ll
  llvm/test/CodeGen/PowerPC/extract-and-store.ll
  llvm/test/CodeGen/PowerPC/fold-rlwinm-1.ll
  llvm/test/CodeGen/PowerPC/fp128-bitcast-after-operation.ll
  llvm/test/CodeGen/PowerPC/funnel-shift-rot.ll
  llvm/test/CodeGen/PowerPC/funnel-shift.ll
  llvm/test/CodeGen/PowerPC/htm-ttest.ll
  llvm/test/CodeGen/PowerPC/htm.ll
  llvm/test/CodeGen/PowerPC/i64_fp_round.ll
  llvm/test/CodeGen/PowerPC/jump-tables-collapse-rotate-remove-SrcMI.mir
  llvm/test/CodeGen/PowerPC/jump-tables-collapse-rotate.ll
  llvm/test/CodeGen/PowerPC/knowCRBitSpill.ll
  llvm/test/CodeGen/PowerPC/legalize-vaarg.ll
  llvm/test/CodeGen/PowerPC/loop-instr-form-prepare.ll
  llvm/test/CodeGen/PowerPC/machine-pre.ll
  llvm/test/CodeGen/PowerPC/memCmpUsedInZeroEqualityComparison.ll
  llvm/test/CodeGen/PowerPC/memcmp-mergeexpand.ll
  llvm/test/CodeGen/PowerPC/memcmp.ll
  llvm/test/CodeGen/PowerPC/optcmp.ll
  llvm/test/CodeGen/PowerPC/ori_imm32.ll
  llvm/test/CodeGen/PowerPC/ori_imm64.ll
  llvm/test/CodeGen/PowerPC/p8-scalar_vector_conversions.ll
  llvm/test/CodeGen/PowerPC/pcrel-jump-table.ll
  llvm/test/CodeGen/PowerPC/popcnt-zext.ll
  llvm/test/CodeGen/PowerPC/ppc64-P9-setb.ll
  llvm/test/CodeGen/PowerPC/ppc64-patchpoint.ll
  llvm/test/CodeGen/PowerPC/ppc64le-aggregates.ll
  llvm/test/CodeGen/PowerPC/pr30640.ll
  llvm/test/CodeGen/PowerPC/pr32140.ll
  llvm/test/CodeGen/PowerPC/pr33093.ll
  llvm/test/CodeGen/PowerPC/pr41088.ll
  llvm/test/CodeGen/PowerPC/pr44183.ll
  llvm/test/CodeGen/PowerPC/rlwimi-and.ll
  llvm/test/CodeGen/PowerPC/rlwimi-dyn-and.ll
  llvm/test/CodeGen/PowerPC/rlwimi-keep-rsh.ll
  llvm/test/CodeGen/PowerPC/rlwimi.ll
  llvm/test/CodeGen/PowerPC/rlwinm.ll
  llvm/test/CodeGen/PowerPC/sched-addi.ll
  llvm/test/CodeGen/PowerPC/setcc-logic.ll
  llvm/test/CodeGen/PowerPC/setcc-to-sub.ll
  llvm/test/CodeGen/PowerPC/setcc_no_zext.ll
  llvm/test/CodeGen/PowerPC/seteq-0.ll
  llvm/test/CodeGen/PowerPC/setrnd.ll
  llvm/test/CodeGen/PowerPC/sms-phi-5.ll
  llvm/test/CodeGen/PowerPC/smulfixsat.ll
  llvm/test/CodeGen/PowerPC/spill_p9_setb.ll
  llvm/test/CodeGen/PowerPC/srem-vector-lkk.ll
  llvm/test/CodeGen/PowerPC/srl-mask.ll
  llvm/test/CodeGen/PowerPC/testBitReverse.ll
  llvm/test/CodeGen/PowerPC/testComparesi32gtu.ll
  llvm/test/CodeGen/PowerPC/testComparesi32leu.ll
  llvm/test/CodeGen/PowerPC/testComparesi32ltu.ll
  llvm/test/CodeGen/PowerPC/testComparesieqsll.ll
  llvm/test/CodeGen/PowerPC/testComparesiequll.ll
  llvm/test/CodeGen/PowerPC/testComparesigesc.ll
  llvm/test/CodeGen/PowerPC/testComparesigesi.ll
  llvm/test/CodeGen/PowerPC/testComparesigesll.ll
  llvm/test/CodeGen/PowerPC/testComparesigess.ll
  llvm/test/CodeGen/PowerPC/testComparesigeuc.ll
  llvm/test/CodeGen/PowerPC/testComparesigeui.ll
  llvm/test/CodeGen/PowerPC/testComparesigeus.ll
  llvm/test/CodeGen/PowerPC/testComparesigtsc.ll
  llvm/test/CodeGen/PowerPC/testComparesigtsi.ll
  llvm/test/CodeGen/PowerPC/testComparesigtsll.ll
  llvm/test/CodeGen/PowerPC/testComparesigtss.ll
  llvm/test/CodeGen/PowerPC/testComparesigtuc.ll
  llvm/test/CodeGen/PowerPC/testComparesigtui.ll
  llvm/test/CodeGen/PowerPC/testComparesigtus.ll
  llvm/test/CodeGen/PowerPC/testComparesilesc.ll
  llvm/test/CodeGen/PowerPC/testComparesilesi.ll
  llvm/test/CodeGen/PowerPC/testComparesilesll.ll
  llvm/test/CodeGen/PowerPC/testComparesiless.ll
  llvm/test/CodeGen/PowerPC/testComparesileuc.ll
  llvm/test/CodeGen/PowerPC/testComparesileui.ll
  llvm/test/CodeGen/PowerPC/testComparesileull.ll
  llvm/test/CodeGen/PowerPC/testComparesileus.ll
  llvm/test/CodeGen/PowerPC/testComparesiltsc.ll
  llvm/test/CodeGen/PowerPC/testComparesiltsi.ll
  llvm/test/CodeGen/PowerPC/testComparesiltsll.ll
  llvm/test/CodeGen/PowerPC/testComparesiltss.ll
  llvm/test/CodeGen/PowerPC/testComparesiltuc.ll
  llvm/test/CodeGen/PowerPC/testComparesiltui.ll
  llvm/test/CodeGen/PowerPC/testComparesiltus.ll
  llvm/test/CodeGen/PowerPC/testCompareslleqsll.ll
  llvm/test/CodeGen/PowerPC/testComparesllequll.ll
  llvm/test/CodeGen/PowerPC/testComparesllgesc.ll
  llvm/test/CodeGen/PowerPC/testComparesllgesi.ll
  llvm/test/CodeGen/PowerPC/testComparesllgesll.ll
  llvm/test/CodeGen/PowerPC/testComparesllgess.ll
  llvm/test/CodeGen/PowerPC/testComparesllgeuc.ll
  llvm/test/CodeGen/PowerPC/testComparesllgeui.ll
  llvm/test/CodeGen/PowerPC/testComparesllgeus.ll
  llvm/test/CodeGen/PowerPC/testComparesllgtsll.ll
  llvm/test/CodeGen/PowerPC/testComparesllgtuc.ll
  llvm/test/CodeGen/PowerPC/testComparesllgtui.ll
  llvm/test/CodeGen/PowerPC/testComparesllgtus.ll
  llvm/test/CodeGen/PowerPC/testCompareslllesc.ll
  llvm/test/CodeGen/PowerPC/testCompareslllesi.ll
  llvm/test/CodeGen/PowerPC/testCompareslllesll.ll
  llvm/test/CodeGen/PowerPC/testComparesllless.ll
  llvm/test/CodeGen/PowerPC/testComparesllleuc.ll
  llvm/test/CodeGen/PowerPC/testComparesllleui.ll
  llvm/test/CodeGen/PowerPC/testComparesllleull.ll
  llvm/test/CodeGen/PowerPC/testComparesllleus.ll
  llvm/test/CodeGen/PowerPC/testComparesllltsll.ll
  llvm/test/CodeGen/PowerPC/testComparesllltuc.ll
  llvm/test/CodeGen/PowerPC/testComparesllltui.ll
  llvm/test/CodeGen/PowerPC/testComparesllltus.ll
  llvm/test/CodeGen/PowerPC/trunc-srl-load.ll
  llvm/test/CodeGen/PowerPC/uint-to-fp-v4i32.ll
  llvm/test/CodeGen/PowerPC/umulfixsat.ll
  llvm/test/CodeGen/PowerPC/urem-vector-lkk.ll
  llvm/test/CodeGen/PowerPC/variable_elem_vec_extracts.ll
  llvm/test/CodeGen/PowerPC/vec_conv_i16_to_fp32_elts.ll
  llvm/test/CodeGen/PowerPC/vec_conv_i8_to_fp32_elts.ll
  llvm/test/CodeGen/PowerPC/vec_extract_p9.ll
  llvm/test/CodeGen/PowerPC/vec_extract_p9_2.ll
  llvm/test/CodeGen/PowerPC/vector-rotates.ll
  llvm/test/CodeGen/PowerPC/zext-bitperm.ll
  llvm/test/MC/Disassembler/PowerPC/ppc64-encoding-ext.txt
  llvm/test/MC/Disassembler/PowerPC/ppc64-encoding.txt
  llvm/test/MC/Disassembler/PowerPC/ppc64le-encoding.txt
  llvm/test/MC/PowerPC/ppc64-encoding-ext.s
  llvm/test/MC/PowerPC/ppc64-encoding.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81819.270655.patch
Type: text/x-patch
Size: 264857 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200615/2c9adefa/attachment-0001.bin>


More information about the llvm-commits mailing list