From 5d868b1ffedfb4917abcb3b41afa6e21d9160ff7 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Fri, 19 Oct 2007 13:05:40 +0000 Subject: [PATCH] If the value types are equal then this routine asserts in later checks rather than producing the ordinary load it is supposed to. Avoid all such hassles by directly returning an ordinary load in this case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43174 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 09e8b579a0f..5b7f1b6e3b8 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -2340,7 +2340,7 @@ SDOperand SelectionDAG::getExtLoad(ISD::LoadExtType ExtType, MVT::ValueType VT, // If they are asking for an extending load from/to the same thing, return a // normal load. if (VT == EVT) - ExtType = ISD::NON_EXTLOAD; + return getLoad(VT, Chain, Ptr, SV, SVOffset, isVolatile, Alignment); if (MVT::isVector(VT)) assert(EVT == MVT::getVectorElementType(VT) && "Invalid vector extload!");