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 d51fa1f..ce91a37 100644
--- a/lib/Target/Sparc/SparcV8ISelSimple.cpp
+++ b/lib/Target/Sparc/SparcV8ISelSimple.cpp
@@ -798,7 +798,7 @@
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::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: