[PATCH] D151848: [X86, Peephole] Enable FoldImmediate for X86

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 31 15:46:08 PDT 2023


Carrot created this revision.
Carrot added reviewers: craig.topper, MatzeB, qcolombet, davidxl.
Herald added subscribers: kerbowa, pengfei, hiraditya, jvesely.
Herald added a project: All.
Carrot requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Enable FoldImmediate for X86 by implementing X86InstrInfo::FoldImmediate.

Also enhanced peephole by deleting identical instructions after FoldImmediate.

This is extracted from D119916 <https://reviews.llvm.org/D119916>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151848

Files:
  llvm/lib/CodeGen/PeepholeOptimizer.cpp
  llvm/lib/Target/X86/X86InstrInfo.cpp
  llvm/lib/Target/X86/X86InstrInfo.h
  llvm/test/CodeGen/AMDGPU/peephole-fold-imm.mir
  llvm/test/CodeGen/X86/div-rem-pair-recomposition-signed.ll
  llvm/test/CodeGen/X86/div-rem-pair-recomposition-unsigned.ll
  llvm/test/CodeGen/X86/fast-isel-freeze.ll
  llvm/test/CodeGen/X86/pcsections-atomics.ll
  llvm/test/CodeGen/X86/physreg-pairs.ll
  llvm/test/CodeGen/X86/popcnt.ll
  llvm/test/CodeGen/X86/ragreedy-hoist-spill.ll
  llvm/test/CodeGen/X86/remat-phys-dead.ll
  llvm/test/CodeGen/X86/speculative-load-hardening-call-and-ret.ll
  llvm/test/CodeGen/X86/vector-shuffle-combining-avx512bwvl.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151848.527214.patch
Type: text/x-patch
Size: 262123 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230531/4be39e2f/attachment-0001.bin>


More information about the llvm-commits mailing list