• Home
  • Raw
  • Download

Lines Matching refs:CastInst

171 TEST(InstructionsTest, CastInst) {  in TEST()  argument
210 EXPECT_TRUE(CastInst::isCastable(V8x8Ty, X86MMXTy)); in TEST()
211 EXPECT_TRUE(CastInst::isCastable(X86MMXTy, V8x8Ty)); in TEST()
212 EXPECT_FALSE(CastInst::isCastable(Int64Ty, X86MMXTy)); in TEST()
213 EXPECT_TRUE(CastInst::isCastable(V8x64Ty, V8x8Ty)); in TEST()
214 EXPECT_TRUE(CastInst::isCastable(V8x8Ty, V8x64Ty)); in TEST()
215 EXPECT_EQ(CastInst::Trunc, CastInst::getCastOpcode(c64, true, V8x8Ty, true)); in TEST()
216 EXPECT_EQ(CastInst::SExt, CastInst::getCastOpcode(c8, true, V8x64Ty, true)); in TEST()
218 EXPECT_FALSE(CastInst::isBitCastable(V8x8Ty, X86MMXTy)); in TEST()
219 EXPECT_FALSE(CastInst::isBitCastable(X86MMXTy, V8x8Ty)); in TEST()
220 EXPECT_FALSE(CastInst::isBitCastable(Int64Ty, X86MMXTy)); in TEST()
221 EXPECT_FALSE(CastInst::isBitCastable(V8x64Ty, V8x8Ty)); in TEST()
222 EXPECT_FALSE(CastInst::isBitCastable(V8x8Ty, V8x64Ty)); in TEST()
225 EXPECT_FALSE(CastInst::isBitCastable(Int32PtrTy, Int32PtrAS1Ty)); in TEST()
226 EXPECT_FALSE(CastInst::isBitCastable(Int32PtrAS1Ty, Int32PtrTy)); in TEST()
227 EXPECT_FALSE(CastInst::isBitCastable(V2Int32PtrTy, V2Int32PtrAS1Ty)); in TEST()
228 EXPECT_FALSE(CastInst::isBitCastable(V2Int32PtrAS1Ty, V2Int32PtrTy)); in TEST()
229 EXPECT_TRUE(CastInst::isBitCastable(V2Int32PtrAS1Ty, V2Int64PtrAS1Ty)); in TEST()
230 EXPECT_TRUE(CastInst::isCastable(V2Int32PtrAS1Ty, V2Int32PtrTy)); in TEST()
231 EXPECT_EQ(CastInst::AddrSpaceCast, CastInst::getCastOpcode(v2ptr32, true, in TEST()
236 EXPECT_FALSE(CastInst::isBitCastable(V2Int32PtrAS1Ty, V4Int64PtrAS1Ty)); in TEST()
237 EXPECT_FALSE(CastInst::isBitCastable(V4Int64PtrAS1Ty, V2Int32PtrAS1Ty)); in TEST()
238 EXPECT_FALSE(CastInst::isBitCastable(V2Int32PtrAS1Ty, V4Int32PtrAS1Ty)); in TEST()
239 EXPECT_FALSE(CastInst::isBitCastable(Int32PtrTy, V2Int32PtrTy)); in TEST()
240 EXPECT_FALSE(CastInst::isBitCastable(V2Int32PtrTy, Int32PtrTy)); in TEST()
242 EXPECT_TRUE(CastInst::isBitCastable(Int32PtrTy, Int64PtrTy)); in TEST()
243 EXPECT_FALSE(CastInst::isBitCastable(DoubleTy, FloatTy)); in TEST()
244 EXPECT_FALSE(CastInst::isBitCastable(FloatTy, DoubleTy)); in TEST()
245 EXPECT_TRUE(CastInst::isBitCastable(FloatTy, FloatTy)); in TEST()
246 EXPECT_TRUE(CastInst::isBitCastable(FloatTy, FloatTy)); in TEST()
247 EXPECT_TRUE(CastInst::isBitCastable(FloatTy, Int32Ty)); in TEST()
248 EXPECT_TRUE(CastInst::isBitCastable(Int16Ty, HalfTy)); in TEST()
249 EXPECT_TRUE(CastInst::isBitCastable(Int32Ty, FloatTy)); in TEST()
250 EXPECT_TRUE(CastInst::isBitCastable(V2Int32Ty, Int64Ty)); in TEST()
252 EXPECT_TRUE(CastInst::isBitCastable(V2Int32Ty, V4Int16Ty)); in TEST()
253 EXPECT_FALSE(CastInst::isBitCastable(Int32Ty, Int64Ty)); in TEST()
254 EXPECT_FALSE(CastInst::isBitCastable(Int64Ty, Int32Ty)); in TEST()
256 EXPECT_FALSE(CastInst::isBitCastable(V2Int32PtrTy, Int64Ty)); in TEST()
257 EXPECT_FALSE(CastInst::isBitCastable(Int64Ty, V2Int32PtrTy)); in TEST()
258 EXPECT_TRUE(CastInst::isBitCastable(V2Int64PtrTy, V2Int32PtrTy)); in TEST()
259 EXPECT_TRUE(CastInst::isBitCastable(V2Int32PtrTy, V2Int64PtrTy)); in TEST()
260 EXPECT_FALSE(CastInst::isBitCastable(V2Int32Ty, V2Int64Ty)); in TEST()
261 EXPECT_FALSE(CastInst::isBitCastable(V2Int64Ty, V2Int32Ty)); in TEST()
264 EXPECT_FALSE(CastInst::castIsValid(Instruction::BitCast, in TEST()
267 EXPECT_FALSE(CastInst::castIsValid(Instruction::BitCast, in TEST()
271 EXPECT_FALSE(CastInst::castIsValid(Instruction::AddrSpaceCast, in TEST()
274 EXPECT_FALSE(CastInst::castIsValid(Instruction::AddrSpaceCast, in TEST()
284 auto Inst1 = CastInst::CreatePointerCast(NullV2I32Ptr, V2Int32Ty, "foo", BB); in TEST()
287 auto Inst2 = CastInst::CreatePointerCast(NullV2I32Ptr, V2Int32Ty); in TEST()
315 CastInst *PtrVecA = new IntToPtrInst(C2xi32a, V2xi32PTy); in TEST()
316 CastInst *PtrVecB = new IntToPtrInst(C2xi32b, V2xi32PTy); in TEST()
332 CastInst *BTC0 = new BitCastInst(Gep0, V2xi8PTy); in TEST()
333 CastInst *BTC1 = new BitCastInst(Gep1, V2xi8PTy); in TEST()
334 CastInst *BTC2 = new BitCastInst(Gep2, V2xi8PTy); in TEST()
335 CastInst *BTC3 = new BitCastInst(Gep3, V2xi8PTy); in TEST()
421 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::PtrToInt, in TEST()
422 CastInst::IntToPtr, in TEST()
425 CastInst::BitCast); in TEST()
429 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::PtrToInt, in TEST()
430 CastInst::IntToPtr, in TEST()
433 CastInst::BitCast); in TEST()
437 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::PtrToInt, in TEST()
438 CastInst::IntToPtr, in TEST()
444 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::IntToPtr, in TEST()
445 CastInst::PtrToInt, in TEST()
448 CastInst::BitCast); in TEST()
451 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::IntToPtr, in TEST()
452 CastInst::PtrToInt, in TEST()
470 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::IntToPtr, in TEST()
471 CastInst::AddrSpaceCast, in TEST()
477 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::AddrSpaceCast, in TEST()
478 CastInst::PtrToInt, in TEST()
484 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::IntToPtr, in TEST()
485 CastInst::BitCast, in TEST()
488 CastInst::IntToPtr); in TEST()