[PATCH] D132107: [DAGCombiner][NFC] Remove extra brackets and add use check for VSCALE.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 18 00:31:05 PDT 2022


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:3723
   // canonicalize (sub X, (vscale * C)) to (add X, (vscale * -C))
-  if (N1.getOpcode() == ISD::VSCALE) {
+  if (N1.getOpcode() == ISD::VSCALE && N1.hasOneUse()) {
     const APInt &IntVal = N1.getConstantOperandAPInt(0);
----------------
this isn't nfc - handle it in a seperate patch, preferably with a test 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132107



More information about the llvm-commits mailing list