[all-commits] [llvm/llvm-project] 5f78ba: [X86][Codegen] Shift amount mod: sh? i64 x, (32-y)...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Tue May 11 09:40:29 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5f78ba001ca23ab826b9be823fc8ac0a0e5d2237
      https://github.com/llvm/llvm-project/commit/5f78ba001ca23ab826b9be823fc8ac0a0e5d2237
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-05-11 (Tue, 11 May 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
    M llvm/test/CodeGen/X86/64-bit-shift-by-32-minus-y.ll

  Log Message:
  -----------
  [X86][Codegen] Shift amount mod: sh? i64 x, (32-y) --> sh? i64 x, -(y+32)

I've seen this in the RawSpeed's BitPumpMSB*::push() hotpath,
after fixing the buffer abstraction to a more sane one,
when looking into a +5% runtime regression.
I was hoping that this would fix it, but it does not look it does.

This seems to be at least not worse than the original pattern.
But i'm actually mainly interested in the case where we already
compute `(y+32)` (see last test),

https://alive2.llvm.org/ce/z/ZCzJio

Reviewed By: spatel

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




More information about the All-commits mailing list