[PATCH] D108129: [DAGCombiner] Teach combineShiftToMULH to handle constant and const splat vector.

Jianjian Guan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 31 19:10:58 PDT 2021


jacquesguan added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:8562
 
-  if ((!(IsSignExt || IsZeroExt)) || LeftOp.getOpcode() != RightOp.getOpcode())
+  if (!(IsSignExt || IsZeroExt))
     return SDValue();
----------------
craig.topper wrote:
> Can you re-write this to
> 
> `if (!IsSignExt && !ZeroExt)`
> 
> 
Done


================
Comment at: llvm/test/CodeGen/RISCV/rvv/vmulhu-sdnode.ll:3
+; RUN: llc -mtriple=riscv32 -mattr=+experimental-v -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK
+; RUN: llc -mtriple=riscv32 -mattr=+experimental-v -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK
+
----------------
craig.topper wrote:
> One of these RUN lines should be -mtriple=riscv64
Done.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108129



More information about the llvm-commits mailing list