[all-commits] [llvm/llvm-project] 9a091d: [X86, Peephole] Enable FoldImmediate for X86

weiguozhi via All-commits all-commits at lists.llvm.org
Fri Oct 27 12:49:40 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9a091de7fe83af010e6ce38e2ed1227ef475bf49
      https://github.com/llvm/llvm-project/commit/9a091de7fe83af010e6ce38e2ed1227ef475bf49
  Author: Guozhi Wei <carrot at google.com>
  Date:   2023-10-27 (Fri, 27 Oct 2023)

  Changed paths:
    M llvm/include/llvm/CodeGen/MachineFunction.h
    M llvm/include/llvm/CodeGen/MachineInstr.h
    M llvm/lib/CodeGen/MachineFunction.cpp
    M llvm/lib/CodeGen/MachineInstr.cpp
    M llvm/lib/CodeGen/PeepholeOptimizer.cpp
    M llvm/lib/Target/X86/X86InstrInfo.cpp
    M llvm/lib/Target/X86/X86InstrInfo.h
    M llvm/test/CodeGen/AMDGPU/peephole-fold-imm.mir
    M llvm/test/CodeGen/X86/GlobalISel/phi.ll
    M llvm/test/CodeGen/X86/div-rem-pair-recomposition-signed.ll
    M llvm/test/CodeGen/X86/div-rem-pair-recomposition-unsigned.ll
    M llvm/test/CodeGen/X86/fast-isel-freeze.ll
    A llvm/test/CodeGen/X86/foldimmediate-size.ll
    A llvm/test/CodeGen/X86/foldimmediate.mir
    M llvm/test/CodeGen/X86/isel-icmp.ll
    M llvm/test/CodeGen/X86/pcsections-atomics.ll
    A llvm/test/CodeGen/X86/peephole-copy.ll
    A llvm/test/CodeGen/X86/peephole-copy.mir
    M llvm/test/CodeGen/X86/physreg-pairs.ll
    M llvm/test/CodeGen/X86/popcnt.ll
    M llvm/test/CodeGen/X86/ragreedy-hoist-spill.ll
    M llvm/test/CodeGen/X86/remat-phys-dead.ll
    M llvm/test/CodeGen/X86/select_const_i128.ll
    M llvm/test/CodeGen/X86/shrink_vmul.ll
    M llvm/test/CodeGen/X86/speculative-load-hardening-call-and-ret.ll
    M llvm/test/CodeGen/X86/swifterror.ll
    M llvm/test/CodeGen/X86/vector-shuffle-combining-avx512bwvl.ll

  Log Message:
  -----------
  [X86, Peephole] Enable FoldImmediate for X86

Enable FoldImmediate for X86 by implementing X86InstrInfo::FoldImmediate.

Also enhanced peephole by deleting identical instructions after FoldImmediate.

Differential Revision: https://reviews.llvm.org/D151848




More information about the All-commits mailing list