Lines Matching refs:ConstantExpr
35 EXPECT_EQ(Zero, ConstantExpr::getAdd(One, One)); in TEST()
39 EXPECT_EQ(Zero, ConstantExpr::getAdd(NegOne, One)); in TEST()
43 EXPECT_EQ(Zero, ConstantExpr::getAdd(NegOne, NegOne)); in TEST()
47 EXPECT_EQ(Zero, ConstantExpr::getSub(NegOne, One)); in TEST()
51 EXPECT_EQ(Zero, ConstantExpr::getSub(One, NegOne)); in TEST()
55 EXPECT_EQ(Zero, ConstantExpr::getSub(One, One)); in TEST()
59 EXPECT_EQ(Poison, ConstantExpr::getShl(One, One)); in TEST()
63 EXPECT_EQ(One, ConstantExpr::getShl(One, Zero)); in TEST()
67 EXPECT_EQ(Poison, ConstantExpr::getLShr(One, One)); in TEST()
71 EXPECT_EQ(Poison, ConstantExpr::getAShr(One, One)); in TEST()
75 EXPECT_EQ(One, ConstantExpr::getMul(NegOne, One)); in TEST()
124 Constant *X = ConstantExpr::getUIToFP(Zero128, FP128Ty); in TEST()
143 ConstantExpr::getPointerCast(Constant::getNullValue(Int8PtrTy), Int64Ty)); in TEST()
147 ConstantExpr::getPointerCast(Constant::getNullValue(Int8PtrTy), in TEST()
152 ConstantExpr::getPointerCast(Constant::getNullValue(Int8PtrVecTy), in TEST()
158 ConstantExpr::getPointerCast(Constant::getNullValue(Int8PtrScalableVecTy), in TEST()
163 ConstantExpr::getPointerCast(Constant::getNullValue(Int8PtrVecTy), in TEST()
169 ConstantExpr::getPointerCast(Constant::getNullValue(Int8PtrScalableVecTy), in TEST()
176 EXPECT_NE(K, ConstantExpr::getAddrSpaceCast( in TEST()
177 ConstantExpr::getIntToPtr(K, Int32PtrTy), Int32Ptr1Ty)); in TEST()
178 EXPECT_NE(K, ConstantExpr::getAddrSpaceCast( in TEST()
179 ConstantExpr::getIntToPtr(K, Int32Ptr1Ty), Int32PtrTy)); in TEST()
186 ConstantExpr::getAddrSpaceCast(NullInt32Ptr0, Int32Ptr1Ty)); in TEST()
189 ConstantExpr::getAddrSpaceCast(NullInt32Ptr1, Int32PtrTy)); in TEST()
196 Instruction *__I = cast<ConstantExpr>(x)->getAsInstruction(); \
219 Constant *P0 = ConstantExpr::getPtrToInt(Global, Int32Ty); in TEST()
220 Constant *P1 = ConstantExpr::getUIToFP(P0, FloatTy); in TEST()
221 Constant *P2 = ConstantExpr::getUIToFP(P0, DoubleTy); in TEST()
222 Constant *P3 = ConstantExpr::getTrunc(P0, Int1Ty); in TEST()
223 Constant *P4 = ConstantExpr::getPtrToInt(Global2, Int32Ty); in TEST()
224 Constant *P5 = ConstantExpr::getUIToFP(P4, FloatTy); in TEST()
225 Constant *P6 = ConstantExpr::getBitCast(P4, FixedVectorType::get(Int16Ty, 2)); in TEST()
243 CHECK(ConstantExpr::getNeg(P0), "sub i32 0, " P0STR); in TEST()
244 CHECK(ConstantExpr::getFNeg(P1), "fneg float " P1STR); in TEST()
245 CHECK(ConstantExpr::getNot(P0), "xor i32 " P0STR ", -1"); in TEST()
246 CHECK(ConstantExpr::getAdd(P0, P0), "add i32 " P0STR ", " P0STR); in TEST()
247 CHECK(ConstantExpr::getAdd(P0, P0, false, true), in TEST()
249 CHECK(ConstantExpr::getAdd(P0, P0, true, true), in TEST()
251 CHECK(ConstantExpr::getSub(P0, P0), "sub i32 " P0STR ", " P0STR); in TEST()
252 CHECK(ConstantExpr::getMul(P0, P0), "mul i32 " P0STR ", " P0STR); in TEST()
253 CHECK(ConstantExpr::getAnd(P0, P0), "and i32 " P0STR ", " P0STR); in TEST()
254 CHECK(ConstantExpr::getOr(P0, P0), "or i32 " P0STR ", " P0STR); in TEST()
255 CHECK(ConstantExpr::getXor(P0, P0), "xor i32 " P0STR ", " P0STR); in TEST()
256 CHECK(ConstantExpr::getShl(P0, P0), "shl i32 " P0STR ", " P0STR); in TEST()
257 CHECK(ConstantExpr::getShl(P0, P0, true), "shl nuw i32 " P0STR ", " P0STR); in TEST()
258 CHECK(ConstantExpr::getShl(P0, P0, false, true), in TEST()
260 CHECK(ConstantExpr::getLShr(P0, P0, false), "lshr i32 " P0STR ", " P0STR); in TEST()
261 CHECK(ConstantExpr::getLShr(P0, P0, true), in TEST()
263 CHECK(ConstantExpr::getAShr(P0, P0, false), "ashr i32 " P0STR ", " P0STR); in TEST()
264 CHECK(ConstantExpr::getAShr(P0, P0, true), in TEST()
267 CHECK(ConstantExpr::getSExt(P0, Int64Ty), "sext i32 " P0STR " to i64"); in TEST()
268 CHECK(ConstantExpr::getZExt(P0, Int64Ty), "zext i32 " P0STR " to i64"); in TEST()
269 CHECK(ConstantExpr::getFPTrunc(P2, FloatTy), in TEST()
271 CHECK(ConstantExpr::getFPExtend(P1, DoubleTy), in TEST()
274 CHECK(ConstantExpr::getSelect(P3, P0, P4), in TEST()
276 CHECK(ConstantExpr::getICmp(CmpInst::ICMP_EQ, P0, P4), in TEST()
278 CHECK(ConstantExpr::getFCmp(CmpInst::FCMP_ULT, P1, P5), in TEST()
287 CHECK(ConstantExpr::getInBoundsGetElementPtr(PointerType::getUnqual(Int32Ty), in TEST()
291 CHECK(ConstantExpr::getExtractElement(P6, One), in TEST()
294 EXPECT_EQ(Poison16, ConstantExpr::getExtractElement(P6, Two)); in TEST()
295 EXPECT_EQ(Poison16, ConstantExpr::getExtractElement(P6, Big)); in TEST()
296 EXPECT_EQ(Poison16, ConstantExpr::getExtractElement(P6, Undef64)); in TEST()
298 EXPECT_EQ(Elt, ConstantExpr::getExtractElement( in TEST()
299 ConstantExpr::getInsertElement(P6, Elt, One), One)); in TEST()
300 EXPECT_EQ(PoisonV16, ConstantExpr::getInsertElement(P6, Elt, Two)); in TEST()
301 EXPECT_EQ(PoisonV16, ConstantExpr::getInsertElement(P6, Elt, Big)); in TEST()
302 EXPECT_EQ(PoisonV16, ConstantExpr::getInsertElement(P6, Elt, Undef64)); in TEST()
316 Constant *GEP = ConstantExpr::getGetElementPtr( in TEST()
339 Constant *GlobalInt = ConstantExpr::getPtrToInt(Global, IntTy); in TEST()
363 Constant *Int1 = ConstantExpr::getPtrToInt(G1, IntTy); in TEST()
364 Constant *Int2 = ConstantExpr::getPtrToInt(G2, IntTy); in TEST()
384 auto *GEP = ConstantExpr::getGetElementPtr(IntTy, Placeholder, C1); in TEST()
408 Constant *Aliasee = ConstantExpr::getBitCast(G, I16PTy); in TEST()
488 auto *C = ConstantExpr::getBitCast(G, PtrTy); in bitcastToGEPHelper()
490 EXPECT_EQ(cast<ConstantExpr>(C)->getOpcode(), Instruction::BitCast); in bitcastToGEPHelper()
516 Constant *TheConstantExpr(ConstantExpr::getPtrToInt(Func, ConstantIntType)); in foldFuncPtrAndConstToNull()
519 ConstantExpr::get(Instruction::And, TheConstantExpr, TheConstant) in foldFuncPtrAndConstToNull()
604 Constant *TheConstantExpr(ConstantExpr::getPtrToInt(Global.get(), IntType)); in TEST()
606 ASSERT_TRUE(ConstantExpr::get(Instruction::And, TheConstantExpr, TheConstant) in TEST()