[all-commits] [llvm/llvm-project] 83af24: [DAG] Generalize fold (not (neg x)) -> (add X, -1)...

guan jian via All-commits all-commits at lists.llvm.org
Mon Sep 8 08:13:21 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 83af24dd85b0a6cf764e69769bf8ab1a49b02cf5
      https://github.com/llvm/llvm-project/commit/83af24dd85b0a6cf764e69769bf8ab1a49b02cf5
  Author: guan jian <148229859+rez5427 at users.noreply.github.com>
  Date:   2025-09-08 (Mon, 08 Sep 2025)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/X86/shift-i128.ll
    A llvm/test/CodeGen/X86/xor-not-combine.ll

  Log Message:
  -----------
  [DAG] Generalize fold (not (neg x)) -> (add X, -1) (#154348)

Generalize `fold (not (neg x)) -> (add X, -1)` to `fold (not (sub Y, X)) -> (add X, ~Y)`

---------

Co-authored-by: Yui5427 <785369607 at qq.com>
Co-authored-by: Simon Pilgrim <llvm-dev at redking.me.uk>



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