[all-commits] [llvm/llvm-project] 66911b: [X86] Fold (add X, (srl Y, 7)) -> (sub X, (icmp_sg...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Mon Jun 9 03:52:29 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 66911b7546f9afcf5f2b842ef0b9a39788dfef39
      https://github.com/llvm/llvm-project/commit/66911b7546f9afcf5f2b842ef0b9a39788dfef39
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2025-06-09 (Mon, 09 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, (icmp_sgt 0, Y)) on vXi8 vectors (#143359)

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

Alternative to #143106 which could cause infinite loops between srl/sra
conversions

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