aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86FastISel.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-04-16 01:16:20 +0000
committerGabor Greif <ggreif@gmail.com>2010-04-16 01:16:20 +0000
commit607a7ab3da72a2eb53553a520507cbb8068dd1d8 (patch)
treea24f057eee6bdd4edd74d509424b13bed1dda2de /lib/Target/X86/X86FastISel.cpp
parent5f0378251c4b682b51d194fce45da1587ed9c97b (diff)
back out r101423 and r101397, they break llvm-gcc self-host on darwin10
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101434 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86FastISel.cpp')
-rw-r--r--lib/Target/X86/X86FastISel.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp
index b41c1fd9fe..606728e499 100644
--- a/lib/Target/X86/X86FastISel.cpp
+++ b/lib/Target/X86/X86FastISel.cpp
@@ -1170,8 +1170,8 @@ bool X86FastISel::X86VisitIntrinsicCall(const IntrinsicInst &I) {
// Emit code inline code to store the stack guard onto the stack.
EVT PtrTy = TLI.getPointerTy();
- const Value *Op1 = I.getOperand(0); // The guard's value.
- const AllocaInst *Slot = cast<AllocaInst>(I.getOperand(1));
+ const Value *Op1 = I.getOperand(1); // The guard's value.
+ const AllocaInst *Slot = cast<AllocaInst>(I.getOperand(2));
// Grab the frame index.
X86AddressMode AM;
@@ -1182,7 +1182,7 @@ bool X86FastISel::X86VisitIntrinsicCall(const IntrinsicInst &I) {
return true;
}
case Intrinsic::objectsize: {
- ConstantInt *CI = dyn_cast<ConstantInt>(I.getOperand(1));
+ ConstantInt *CI = dyn_cast<ConstantInt>(I.getOperand(2));
const Type *Ty = I.getCalledFunction()->getReturnType();
assert(CI && "Non-constant type in Intrinsic::objectsize?");
@@ -1237,8 +1237,8 @@ bool X86FastISel::X86VisitIntrinsicCall(const IntrinsicInst &I) {
if (!isTypeLegal(RetTy, VT))
return false;
- const Value *Op1 = I.getOperand(0);
- const Value *Op2 = I.getOperand(1);
+ const Value *Op1 = I.getOperand(1);
+ const Value *Op2 = I.getOperand(2);
unsigned Reg1 = getRegForValue(Op1);
unsigned Reg2 = getRegForValue(Op2);
@@ -1281,7 +1281,7 @@ bool X86FastISel::X86VisitIntrinsicCall(const IntrinsicInst &I) {
bool X86FastISel::X86SelectCall(const Instruction *I) {
const CallInst *CI = cast<CallInst>(I);
- const Value *Callee = CI->getCalledValue();
+ const Value *Callee = I->getOperand(0);
// Can't handle inline asm yet.
if (isa<InlineAsm>(Callee))