[llvm] r324244 - [Hexagon] Forgot about HexagonISD::VZERO in selecting const vectors

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 5 07:52:54 PST 2018


Author: kparzysz
Date: Mon Feb  5 07:52:54 2018
New Revision: 324244

URL: http://llvm.org/viewvc/llvm-project?rev=324244&view=rev
Log:
[Hexagon] Forgot about HexagonISD::VZERO in selecting const vectors

Modified:
    llvm/trunk/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp

Modified: llvm/trunk/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp?rev=324244&r1=324243&r2=324244&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp Mon Feb  5 07:52:54 2018
@@ -926,7 +926,7 @@ bool HvxSelector::selectVectorConstants(
     if (N->isMachineOpcode())
       return false;
     unsigned Opc = N->getOpcode();
-    if (Opc == HexagonISD::VSPLAT)
+    if (Opc == HexagonISD::VSPLAT || Opc == HexagonISD::VZERO)
       return true;
     if (Opc == ISD::BITCAST) {
       // Only select bitcasts of VSPLATs.




More information about the llvm-commits mailing list