[all-commits] [llvm/llvm-project] 1ce05a: [x86] improve CMOV codegen by pushing add into ope...

RotateRight via All-commits all-commits at lists.llvm.org
Sun Jul 25 07:08:49 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1ce05ad619a5904f15f35a5c96ece27ee1991f1c
      https://github.com/llvm/llvm-project/commit/1ce05ad619a5904f15f35a5c96ece27ee1991f1c
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-07-25 (Sun, 25 Jul 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/add-cmov.ll

  Log Message:
  -----------
  [x86] improve CMOV codegen by pushing add into operands, part 2

This is a minimum extension of D106607 to allow folding for
2 non-zero constantsi that can be materialized as immediates..

In the reduced test examples, we save 1 instruction by rolling
the constants into LEA/ADD. In the motivating test from the bullet
benchmark, we absorb both of the constant moves into add ops via
LEA magic, so we reduce by 2 instructions.

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




More information about the All-commits mailing list