[PATCH] D158366: [DAG] replaceStoreOfInsertLoad - don't fold if the inserted element is implicity truncated

Jacob Young via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 20 08:05:16 PDT 2023


jacobly added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:20514
   EVT EltVT = Elt.getValueType();
-  if (!EltVT.isByteSized())
+  if (!EltVT.isByteSized() || EltVT != Value.getOperand(0).getValueType())
     return SDValue();
----------------
`EltVT` is the scalar type being inserted, but operand 0 is the vector being inserted into, so these types can never be equal.  Maybe `EltVT != Value.getOperand(0).getValueType().getVectorElementType()`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158366



More information about the llvm-commits mailing list