[PATCH] D62341: [DAGCombine][X86][AArch64][AMDGPU][MIPS][PPC] (sub x, c) -> (add x, -c) vector edition.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 23 13:40:41 PDT 2019


RKSimon added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2819
+  // fold (sub x, c) -> (add x, (sub 0, c))
+  if (isConstantOrConstantVector(N1, /* NoOpaques */ true)) {
+    SDValue NegC = DAG.FoldConstantArithmetic(
----------------
Do we need a (!VT.isVector() || N1.hasOneUse()) limit?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62341/new/

https://reviews.llvm.org/D62341





More information about the llvm-commits mailing list