[PATCH] D39685: AMDGPU: Handle or in multi-use shl ptr combi

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 09:37:47 PST 2017


rampitec added inline comments.


================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:5123
   // TODO: Support or
-  if (N0.getOpcode() != ISD::ADD || N0->hasOneUse())
+  if ((N0.getOpcode() != ISD::ADD && N0.getOpcode() != ISD::OR) &&
+      !N0->hasOneUse())
----------------
arsenm wrote:
> rampitec wrote:
> > || N0->hasOneUse() is more readable in my view.
> I'm not sure what you mean, that would remove the early return
Hm... This changes original logic and contradicts the comment above. Before we did early return if there is only one use, just as written in the comment. Now you only do the transformation if there is one use.


https://reviews.llvm.org/D39685





More information about the llvm-commits mailing list