[all-commits] [llvm/llvm-project] b8c8bb: [DAG] Fold neg(splat(neg(x)) -> splat(x)

David Green via All-commits all-commits at lists.llvm.org
Fri Jun 25 11:53:49 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b8c8bb07692cfb9a78049fd2fb5c46a91ee2e90f
      https://github.com/llvm/llvm-project/commit/b8c8bb07692cfb9a78049fd2fb5c46a91ee2e90f
  Author: David Green <david.green at arm.com>
  Date:   2021-06-25 (Fri, 25 Jun 2021)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/AArch64/neon-shift-neg.ll
    M llvm/test/CodeGen/AArch64/sub-splat-sub.ll

  Log Message:
  -----------
  [DAG] Fold neg(splat(neg(x)) -> splat(x)

This add as a fold of sub(0, splat(sub(0, x))) -> splat(x). This can
come up in the lowering of right shifts under AArch64, where we generate
a shift left of a negated number.

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




More information about the All-commits mailing list