llvm.org GIT mirror llvm / 88f2d6c
convertToSignExtendedInteger should return opInvalidOp instead of asserting if sematics of float does not allow arithmetics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60042 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 11 years ago
2 changed file(s) with 18 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
114114 assertArithmeticOK(const llvm::fltSemantics &semantics) {
115115 assert(semantics.arithmeticOK
116116 && "Compile-time arithmetic does not support these semantics");
117 }
118
119 static inline bool
120 isArithmeticOk(const llvm::fltSemantics &semantics) {
121 return semantics.arithmeticOK;
117122 }
118123
119124 /* Return the value of a decimal exponent of the form
17861791 const integerPart *src;
17871792 unsigned int dstPartsCount, truncatedBits;
17881793
1789 assertArithmeticOK(*semantics);
1794 if (!isArithmeticOk(*semantics))
1795 return opInvalidOp;
17901796
17911797 *isExact = false;
17921798
0 ; RUN: llvm-as < %s | opt -indvars
1
2 define void @t() nounwind {
3 entry:
4 br label %bb23.i91
5
6 bb23.i91: ; preds = %bb23.i91, %entry
7 %result.0.i89 = phi ppc_fp128 [ 0xM00000000000000000000000000000000, %entry ], [ %0, %bb23.i91 ] ; [#uses=2]
8 %0 = mul ppc_fp128 %result.0.i89, %result.0.i89 ; [#uses=1]
9 br label %bb23.i91
10 }