[PATCH] D34723: [AMDGPU] truncate left shift

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 17:08:40 PDT 2017


rampitec 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);
----------------
arsenm wrote:
> 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?
Ah. That one only works with constants.


https://reviews.llvm.org/D34723





More information about the llvm-commits mailing list