From: Brian Gaeke Date: Sun, 10 Oct 2004 20:34:17 +0000 (+0000) Subject: Fix assertion failure when calling or returning from a function which X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=299b39d35634712993f98c732224078dba2bdac4;p=oota-llvm.git Fix assertion failure when calling or returning from a function which returns 'bool' type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16884 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Sparc/SparcV8ISelSimple.cpp b/lib/Target/Sparc/SparcV8ISelSimple.cpp index d51fa1fbe97..ce91a37958b 100644 --- a/lib/Target/Sparc/SparcV8ISelSimple.cpp +++ b/lib/Target/Sparc/SparcV8ISelSimple.cpp @@ -798,7 +798,7 @@ void V8ISel::visitCallInst(CallInst &I) { if (I.getType () == Type::VoidTy) return; unsigned DestReg = getReg (I); - switch (getClass (I.getType ())) { + switch (getClassB (I.getType ())) { case cByte: case cShort: case cInt: @@ -823,7 +823,7 @@ void V8ISel::visitCallInst(CallInst &I) { void V8ISel::visitReturnInst(ReturnInst &I) { if (I.getNumOperands () == 1) { unsigned RetValReg = getReg (I.getOperand (0)); - switch (getClass (I.getOperand (0)->getType ())) { + switch (getClassB (I.getOperand (0)->getType ())) { case cByte: case cShort: case cInt: diff --git a/lib/Target/SparcV8/SparcV8ISelSimple.cpp b/lib/Target/SparcV8/SparcV8ISelSimple.cpp index d51fa1fbe97..ce91a37958b 100644 --- a/lib/Target/SparcV8/SparcV8ISelSimple.cpp +++ b/lib/Target/SparcV8/SparcV8ISelSimple.cpp @@ -798,7 +798,7 @@ void V8ISel::visitCallInst(CallInst &I) { if (I.getType () == Type::VoidTy) return; unsigned DestReg = getReg (I); - switch (getClass (I.getType ())) { + switch (getClassB (I.getType ())) { case cByte: case cShort: case cInt: @@ -823,7 +823,7 @@ void V8ISel::visitCallInst(CallInst &I) { void V8ISel::visitReturnInst(ReturnInst &I) { if (I.getNumOperands () == 1) { unsigned RetValReg = getReg (I.getOperand (0)); - switch (getClass (I.getOperand (0)->getType ())) { + switch (getClassB (I.getOperand (0)->getType ())) { case cByte: case cShort: case cInt: