[PATCH] D34077: DAGCombine: Combine BUILD_VECTOR to TRUNCATE

Elena Demikhovsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 26 05:56:39 PDT 2017


delena added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:14289
 
+  if (SDValue V = reduceBuildVecToTrunc(N))
+    return V;
----------------
zvi wrote:
> delena wrote:
> > I'd put isDesirable..() here, before call to reduceBuildVecToTrunc(), with N node as parameter.
> But we don't know in advance what will be the truncate's operand type and result type. Need to some analysis first.
isDisarable..() will not check types, strides etc. You can check this in reduceBuildVecToTrunc for targets where such transformation is profitable.


https://reviews.llvm.org/D34077





More information about the llvm-commits mailing list