[all-commits] [llvm/llvm-project] 4e676a: [X86] Fold (add X, (srl Y, 7)) -> (sub X, (ashr Y, ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Fri Jun 6 05:33:22 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4e676a13171c8af7fde20c1d2de9668f68b4a920
      https://github.com/llvm/llvm-project/commit/4e676a13171c8af7fde20c1d2de9668f68b4a920
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2025-06-06 (Fri, 06 Jun 2025)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/vector-idiv-sdiv-128.ll
    M llvm/test/CodeGen/X86/vector-idiv-sdiv-256.ll
    M llvm/test/CodeGen/X86/vector-idiv-sdiv-512.ll

  Log Message:
  -----------
  [X86] Fold (add X, (srl Y, 7)) -> (sub X, (ashr Y, 7)) on vXi8 vectors (#143106)

Undo the vectorcombine canonicalisation as SSE has awful vXi8 shift support, but can easily splat the MSB using the PCMPGTB(0,x) trick.

Fixes #130549



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list