[llvm] r374862 - [X86] Don't check for VBROADCAST_LOAD being a user of the source of a VBROADCAST when trying to share broadcasts.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 14 23:10:11 PDT 2019


Author: ctopper
Date: Mon Oct 14 23:10:11 2019
New Revision: 374862

URL: http://llvm.org/viewvc/llvm-project?rev=374862&view=rev
Log:
[X86] Don't check for VBROADCAST_LOAD being a user of the source of a VBROADCAST when trying to share broadcasts.

The only things VBROADCAST_LOAD uses is an address and a chain
node. It has no vector inputs.

So if its a user of the source of another broadcast that could
only mean one of two things. The other broadcast is broadcasting
the address of the broadcast_load. Or the source is a load and
the use we're seeing is the chain result from that load. Neither
of these cases make sense to combine here.

This issue was reported post-commit r373871. Test case has not
been reduced yet.

Modified:
    llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=374862&r1=374861&r2=374862&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Oct 14 23:10:11 2019
@@ -33450,9 +33450,7 @@ static SDValue combineTargetShuffle(SDVa
 
     // Share broadcast with the longest vector and extract low subvector (free).
     for (SDNode *User : Src->uses())
-      if (User != N.getNode() &&
-          (User->getOpcode() == X86ISD::VBROADCAST ||
-           User->getOpcode() == X86ISD::VBROADCAST_LOAD) &&
+      if (User != N.getNode() && User->getOpcode() == X86ISD::VBROADCAST &&
           User->getValueSizeInBits(0) > VT.getSizeInBits()) {
         return extractSubVector(SDValue(User, 0), 0, DAG, DL,
                                 VT.getSizeInBits());




More information about the llvm-commits mailing list