Lines Matching refs:APFixedPoint
14 using llvm::APFixedPoint;
136 ASSERT_EQ(APFixedPoint::getMax(Sema).getValue(), in CheckUnpaddedMax()
141 ASSERT_EQ(APFixedPoint::getMax(Sema).getValue(), in CheckPaddedMax()
146 ASSERT_EQ(APFixedPoint::getMin(Sema).getValue(), in CheckMin()
198 APFixedPoint ValWithFract(APInt(Sema.getWidth(), in CheckIntPart()
205 APFixedPoint JustFract( in CheckIntPart()
210 APFixedPoint WholeNum( in CheckIntPart()
216 APFixedPoint Negative( in CheckIntPart()
223 ASSERT_EQ(APFixedPoint::getMin(Sema).getIntPart(), Expected); in CheckIntPartMin()
227 ASSERT_EQ(APFixedPoint::getMax(Sema).getIntPart(), Expected); in CheckIntPartMax()
307 ASSERT_EQ(APFixedPoint(320, getSAccumSema()), in TEST()
308 APFixedPoint(81920, getAccumSema())); in TEST()
309 ASSERT_EQ(APFixedPoint(320, getSAccumSema()), in TEST()
310 APFixedPoint(5368709120, getLAccumSema())); in TEST()
311 ASSERT_EQ(APFixedPoint(0, getSAccumSema()), APFixedPoint(0, getLAccumSema())); in TEST()
314 ASSERT_EQ(APFixedPoint(64, getSAccumSema()), in TEST()
315 APFixedPoint(64, getSFractSema())); in TEST()
316 ASSERT_EQ(APFixedPoint(16384, getAccumSema()), in TEST()
317 APFixedPoint(16384, getFractSema())); in TEST()
318 ASSERT_EQ(APFixedPoint(1073741824, getLAccumSema()), in TEST()
319 APFixedPoint(1073741824, getLFractSema())); in TEST()
322 ASSERT_EQ(APFixedPoint(64, getSAccumSema()), in TEST()
323 APFixedPoint(16384, getFractSema())); in TEST()
324 ASSERT_EQ(APFixedPoint(64, getSAccumSema()), in TEST()
325 APFixedPoint(1073741824, getLFractSema())); in TEST()
328 ASSERT_EQ(APFixedPoint(320, getSAccumSema()), in TEST()
329 APFixedPoint(81920, Saturated(getAccumSema()))); in TEST()
332 ASSERT_EQ(APFixedPoint(320, getSAccumSema()), in TEST()
333 APFixedPoint(640, getUSAccumSema())); in TEST()
334 ASSERT_EQ(APFixedPoint(-320, getSAccumSema()), in TEST()
335 APFixedPoint(-81920, getAccumSema())); in TEST()
338 ASSERT_EQ(APFixedPoint(320, getSAccumSema()), in TEST()
339 APFixedPoint(320, getPadUSAccumSema())); in TEST()
340 ASSERT_EQ(APFixedPoint(640, getUSAccumSema()), in TEST()
341 APFixedPoint(320, getPadUSAccumSema())); in TEST()
344 ASSERT_LT(APFixedPoint(-1, getSAccumSema()), APFixedPoint(0, getAccumSema())); in TEST()
345 ASSERT_LT(APFixedPoint(-1, getSAccumSema()), in TEST()
346 APFixedPoint(0, getUAccumSema())); in TEST()
347 ASSERT_LT(APFixedPoint(0, getSAccumSema()), APFixedPoint(1, getAccumSema())); in TEST()
348 ASSERT_LT(APFixedPoint(0, getSAccumSema()), APFixedPoint(1, getUAccumSema())); in TEST()
349 ASSERT_LT(APFixedPoint(0, getUSAccumSema()), APFixedPoint(1, getAccumSema())); in TEST()
350 ASSERT_LT(APFixedPoint(0, getUSAccumSema()), in TEST()
351 APFixedPoint(1, getUAccumSema())); in TEST()
354 ASSERT_GT(APFixedPoint(0, getAccumSema()), APFixedPoint(-1, getSAccumSema())); in TEST()
355 ASSERT_GT(APFixedPoint(0, getUAccumSema()), in TEST()
356 APFixedPoint(-1, getSAccumSema())); in TEST()
357 ASSERT_GT(APFixedPoint(1, getAccumSema()), APFixedPoint(0, getSAccumSema())); in TEST()
358 ASSERT_GT(APFixedPoint(1, getUAccumSema()), APFixedPoint(0, getSAccumSema())); in TEST()
359 ASSERT_GT(APFixedPoint(1, getAccumSema()), APFixedPoint(0, getUSAccumSema())); in TEST()
360 ASSERT_GT(APFixedPoint(1, getUAccumSema()), in TEST()
361 APFixedPoint(0, getUSAccumSema())); in TEST()
381 APFixedPoint Fixed(TestVal, Src); in CheckUnsaturatedConversion()
382 APFixedPoint Expected(ScaledVal, Dst); in CheckUnsaturatedConversion()
390 APFixedPoint Fixed(TestVal, Src); in CheckSaturatedConversionMin()
391 ASSERT_EQ(Fixed.convert(Dst), APFixedPoint::getMin(Dst)); in CheckSaturatedConversionMin()
398 APFixedPoint Fixed(TestVal, Src); in CheckSaturatedConversionMax()
399 ASSERT_EQ(Fixed.convert(Dst), APFixedPoint::getMax(Dst)); in CheckSaturatedConversionMax()
606 APFixedPoint Fixed(255 << 7, getSAccumSema()); in TEST()
608 APFixedPoint UFixed = Fixed.convert(getUSAccumSema()); in TEST()
615 APFixedPoint Val = APFixedPoint(1ULL << 7, getSAccumSema()); in TEST()
618 Val = APFixedPoint(1ULL << 23, getAccumSema()); in TEST()
621 Val = APFixedPoint(1ULL << 47, getLAccumSema()); in TEST()
625 Val = APFixedPoint(/*-1.5*/ -192, getSAccumSema()); in TEST()
628 Val = APFixedPoint(-(257 << 15), getAccumSema()); in TEST()
631 Val = APFixedPoint(-(65537ULL << 31), getLAccumSema()); in TEST()
635 Val = APFixedPoint(-(1 << 7), getSAccumSema()); in TEST()
638 Val = APFixedPoint(-(1 << 15), getAccumSema()); in TEST()
641 Val = APFixedPoint(-(1ULL << 31), getLAccumSema()); in TEST()
651 ASSERT_EQ(APFixedPoint::getFromFloatValue(Val, Sema, &Ovf).getValue(), in CheckFloatToFixedConversion()
655 APFixedPoint::getFromFloatValue(Val, Saturated(Sema), &Ovf).getValue(), in CheckFloatToFixedConversion()
663 (void)APFixedPoint::getFromFloatValue(Val, Sema, &Ovf); in CheckFloatToFixedConversion()
666 APFixedPoint::getFromFloatValue(Val, Saturated(Sema), &Ovf).getValue(), in CheckFloatToFixedConversion()
667 (ExpectedOvf == MinSat ? APFixedPoint::getMin(Sema) in CheckFloatToFixedConversion()
668 : APFixedPoint::getMax(Sema)) in CheckFloatToFixedConversion()
826 APFixedPoint FXVal(Val, Sema); in CheckFixedToFloatConversion()
833 APFixedPoint FXVal(Val, Sema); in CheckFixedToHalfConversion()