[llvm-commits] [dragonegg] r126437 - /dragonegg/trunk/llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Thu Feb 24 13:33:51 PST 2011
Author: baldrick
Date: Thu Feb 24 15:33:51 2011
New Revision: 126437
URL: http://llvm.org/viewvc/llvm-project?rev=126437&view=rev
Log:
Fix what looks like a clear thinko: using Match to look up the
sign in the call outputs sign array.
Modified:
dragonegg/trunk/llvm-convert.cpp
Modified: dragonegg/trunk/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=126437&r1=126436&r2=126437&view=diff
==============================================================================
--- dragonegg/trunk/llvm-convert.cpp (original)
+++ dragonegg/trunk/llvm-convert.cpp Thu Feb 24 15:33:51 2011
@@ -6960,12 +6960,14 @@
// This output might have gotten put in either CallResult or CallArg
// depending whether it's a register or not. Find its type.
const Type *OTy = 0;
+ unsigned OutputIndex = ~0U;
if (Match < OutputLocations.size()) {
// Indices here known to be within range.
+ OutputIndex = OutputLocations[Match].second;
if (OutputLocations[Match].first)
- OTy = CallResultTypes[OutputLocations[Match].second];
+ OTy = CallResultTypes[OutputIndex];
else {
- OTy = CallArgTypes[OutputLocations[Match].second];
+ OTy = CallArgTypes[OutputIndex];
assert(OTy->isPointerTy() && "Expected pointer type!");
OTy = cast<PointerType>(OTy)->getElementType();
}
@@ -6998,7 +7000,7 @@
return;
} else if (OTyBits > OpTyBits) {
Op = CastToAnyType(Op, !TYPE_UNSIGNED(type),
- OTy, CallResultIsSigned[Match]);
+ OTy, CallResultIsSigned[OutputIndex]);
if (BYTES_BIG_ENDIAN) {
Constant *ShAmt = ConstantInt::get(Op->getType(),
OTyBits-OpTyBits);
More information about the llvm-commits
mailing list