llvm.org GIT mirror llvm / c650f1f
'The attached patch fixes an issue where llc -march=cpp fails with "Invalid primitive type" on input containing the x86_fp80 type.' Patch by Collin Winter! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70610 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 11 years ago
2 changed file(s) with 17 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
358358 unsigned BitWidth = cast(Ty)->getBitWidth();
359359 return "IntegerType::get(" + utostr(BitWidth) + ")";
360360 }
361 case Type::FloatTyID: return "Type::FloatTy";
362 case Type::DoubleTyID: return "Type::DoubleTy";
363 case Type::LabelTyID: return "Type::LabelTy";
361 case Type::X86_FP80TyID: return "Type::X86_FP80Ty";
362 case Type::FloatTyID: return "Type::FloatTy";
363 case Type::DoubleTyID: return "Type::DoubleTy";
364 case Type::LabelTyID: return "Type::LabelTy";
364365 default:
365366 error("Invalid primitive type");
366367 break;
0 ; RUN: llvm-as < %s | llc -march=cpp -cppgen=program -f -o %t
1
2 define x86_fp80 @some_func() nounwind {
3 entry:
4 %retval = alloca x86_fp80 ; [#uses=2]
5 %call = call i32 (...)* @other_func() ; [#uses=1]
6 %conv = sitofp i32 %call to x86_fp80 ; [#uses=1]
7 store x86_fp80 %conv, x86_fp80* %retval
8 %0 = load x86_fp80* %retval ; [#uses=1]
9 ret x86_fp80 %0
10 }
11
12 declare i32 @other_func(...)