[llvm] 8eb054a - AArch64: compare correct type for multi-valued SDNode.

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 18 01:35:44 PDT 2021


Author: Tim Northover
Date: 2021-08-18T09:35:31+01:00
New Revision: 8eb054a87df2c0f49481e70c673cdbbb63aee024

URL: https://github.com/llvm/llvm-project/commit/8eb054a87df2c0f49481e70c673cdbbb63aee024
DIFF: https://github.com/llvm/llvm-project/commit/8eb054a87df2c0f49481e70c673cdbbb63aee024.diff

LOG: AArch64: compare correct type for multi-valued SDNode.

If Orig produces more than one value (rare) with different types (rarer) then
we need to make sure we check against the one that Orig actually represents,
not just the first type.

Unfortunately because of the combination of things that need to happen I wasn't
able to produce a test.

Added: 
    

Modified: 
    llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index 8de9bd79a7f7..0e5e70475503 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -15378,7 +15378,7 @@ static SDValue foldTruncStoreOfExt(SelectionDAG &DAG, SDNode *N) {
         ExtOpCode != ISD::ANY_EXTEND)
       return SDValue();
     SDValue Orig = Ext->getOperand(0);
-    if (Store->getMemoryVT() != Orig->getValueType(0))
+    if (Store->getMemoryVT() != Orig.getValueType())
       return SDValue();
     return DAG.getStore(Store->getChain(), SDLoc(Store), Orig,
                         Store->getBasePtr(), Store->getPointerInfo(),


        


More information about the llvm-commits mailing list