Lines Matching +full:cs +full:- +full:1
1 //===-- OpDescriptor.cpp --------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
16 static cl::opt<bool> UseUndef("use-undef",
20 void fuzzerop::makeConstantsWithType(Type *T, std::vector<Constant *> &Cs) {
22 uint64_t W = IntTy->getBitWidth();
23 Cs.push_back(ConstantInt::get(IntTy, 0));
24 Cs.push_back(ConstantInt::get(IntTy, 1));
25 Cs.push_back(ConstantInt::get(IntTy, 42));
26 Cs.push_back(ConstantInt::get(IntTy, APInt::getMaxValue(W)));
27 Cs.push_back(ConstantInt::get(IntTy, APInt::getMinValue(W)));
28 Cs.push_back(ConstantInt::get(IntTy, APInt::getSignedMaxValue(W)));
29 Cs.push_back(ConstantInt::get(IntTy, APInt::getSignedMinValue(W)));
30 Cs.push_back(ConstantInt::get(IntTy, APInt::getOneBitSet(W, W / 2)));
31 } else if (T->isFloatingPointTy()) {
32 auto &Ctx = T->getContext();
33 auto &Sem = T->getFltSemantics();
34 Cs.push_back(ConstantFP::get(Ctx, APFloat::getZero(Sem)));
35 Cs.push_back(ConstantFP::get(Ctx, APFloat(Sem, 1)));
36 Cs.push_back(ConstantFP::get(Ctx, APFloat(Sem, 42)));
37 Cs.push_back(ConstantFP::get(Ctx, APFloat::getLargest(Sem)));
38 Cs.push_back(ConstantFP::get(Ctx, APFloat::getSmallest(Sem)));
39 Cs.push_back(ConstantFP::get(Ctx, APFloat::getInf(Sem)));
40 Cs.push_back(ConstantFP::get(Ctx, APFloat::getNaN(Sem)));
43 Type *EltTy = VecTy->getElementType();
45 ElementCount EC = VecTy->getElementCount();
47 Cs.push_back(ConstantVector::getSplat(EC, Elt));
51 Cs.push_back(UndefValue::get(T));
52 Cs.push_back(PoisonValue::get(T));