[all-commits] [llvm/llvm-project] e7a0fa: [DAG] foldAddSubOfSignBit - don't bother creating ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Jul 5 08:44:57 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e7a0fa4df00c6386632d1395799c6150f39a3e33
      https://github.com/llvm/llvm-project/commit/e7a0fa4df00c6386632d1395799c6150f39a3e33
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-07-05 (Tue, 05 Jul 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

  Log Message:
  -----------
  [DAG] foldAddSubOfSignBit - don't bother creating the new shift node unless constant folding succeeds

Noticed by inspection - the new shift is only ever used if the constant fold occurs


  Commit: 7068c843d25447e5fc9b1c2a1f7d91275642cc24
      https://github.com/llvm/llvm-project/commit/7068c843d25447e5fc9b1c2a1f7d91275642cc24
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-07-05 (Tue, 05 Jul 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

  Log Message:
  -----------
  [DAG] visitREM - use isAllOnesOrAllOnesSplat instead of isConstOrConstSplat

We were only using the N1C scalar/splat value once, so for clarity use isAllOnesOrAllOnesSplat instead if we actually need it.


Compare: https://github.com/llvm/llvm-project/compare/ed3b040b54f4...7068c843d254


More information about the All-commits mailing list