[PATCH] D34723: [AMDGPU] truncate left shift

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 17:06:23 PDT 2017


arsenm added inline comments.


================
Comment at: lib/Target/AMDGPU/AMDGPUISelLowering.cpp:2761-2762
 
+SDValue AMDGPUTargetLowering::performTruncCombine(SDNode *N,
+                                                  DAGCombinerInfo &DCI) const {
+  EVT VT = N->getValueType(0);
----------------
This exact combine is already done in DAGCombiner:

  // trunc (shl x, K) -> shl (trunc x), K => K < VT.getScalarSizeInBits()

Why isn't it triggering? Is the other combine you added missing an AddToWorklist or something?


https://reviews.llvm.org/D34723





More information about the llvm-commits mailing list