• Home
  • Raw
  • Download

Lines Matching refs:CastInst

183 TEST(InstructionsTest, CastInst) {  in TEST()  argument
232 EXPECT_EQ(CastInst::Trunc, CastInst::getCastOpcode(c64, true, V8x8Ty, true)); in TEST()
233 EXPECT_EQ(CastInst::SExt, CastInst::getCastOpcode(c8, true, V8x64Ty, true)); in TEST()
235 EXPECT_FALSE(CastInst::isBitCastable(V8x8Ty, X86MMXTy)); in TEST()
236 EXPECT_FALSE(CastInst::isBitCastable(X86MMXTy, V8x8Ty)); in TEST()
237 EXPECT_FALSE(CastInst::isBitCastable(Int64Ty, X86MMXTy)); in TEST()
238 EXPECT_FALSE(CastInst::isBitCastable(V8x64Ty, V8x8Ty)); in TEST()
239 EXPECT_FALSE(CastInst::isBitCastable(V8x8Ty, V8x64Ty)); in TEST()
242 EXPECT_FALSE(CastInst::isBitCastable(Int32PtrTy, Int32PtrAS1Ty)); in TEST()
243 EXPECT_FALSE(CastInst::isBitCastable(Int32PtrAS1Ty, Int32PtrTy)); in TEST()
244 EXPECT_FALSE(CastInst::isBitCastable(V2Int32PtrTy, V2Int32PtrAS1Ty)); in TEST()
245 EXPECT_FALSE(CastInst::isBitCastable(V2Int32PtrAS1Ty, V2Int32PtrTy)); in TEST()
246 EXPECT_TRUE(CastInst::isBitCastable(V2Int32PtrAS1Ty, V2Int64PtrAS1Ty)); in TEST()
247 EXPECT_EQ(CastInst::AddrSpaceCast, CastInst::getCastOpcode(v2ptr32, true, in TEST()
252 EXPECT_FALSE(CastInst::isBitCastable(V2Int32PtrAS1Ty, V4Int64PtrAS1Ty)); in TEST()
253 EXPECT_FALSE(CastInst::isBitCastable(V4Int64PtrAS1Ty, V2Int32PtrAS1Ty)); in TEST()
254 EXPECT_FALSE(CastInst::isBitCastable(V2Int32PtrAS1Ty, V4Int32PtrAS1Ty)); in TEST()
255 EXPECT_FALSE(CastInst::isBitCastable(Int32PtrTy, V2Int32PtrTy)); in TEST()
256 EXPECT_FALSE(CastInst::isBitCastable(V2Int32PtrTy, Int32PtrTy)); in TEST()
258 EXPECT_TRUE(CastInst::isBitCastable(Int32PtrTy, Int64PtrTy)); in TEST()
259 EXPECT_FALSE(CastInst::isBitCastable(DoubleTy, FloatTy)); in TEST()
260 EXPECT_FALSE(CastInst::isBitCastable(FloatTy, DoubleTy)); in TEST()
261 EXPECT_TRUE(CastInst::isBitCastable(FloatTy, FloatTy)); in TEST()
262 EXPECT_TRUE(CastInst::isBitCastable(FloatTy, FloatTy)); in TEST()
263 EXPECT_TRUE(CastInst::isBitCastable(FloatTy, Int32Ty)); in TEST()
264 EXPECT_TRUE(CastInst::isBitCastable(Int16Ty, HalfTy)); in TEST()
265 EXPECT_TRUE(CastInst::isBitCastable(Int32Ty, FloatTy)); in TEST()
266 EXPECT_TRUE(CastInst::isBitCastable(V2Int32Ty, Int64Ty)); in TEST()
268 EXPECT_TRUE(CastInst::isBitCastable(V2Int32Ty, V4Int16Ty)); in TEST()
269 EXPECT_FALSE(CastInst::isBitCastable(Int32Ty, Int64Ty)); in TEST()
270 EXPECT_FALSE(CastInst::isBitCastable(Int64Ty, Int32Ty)); in TEST()
272 EXPECT_FALSE(CastInst::isBitCastable(V2Int32PtrTy, Int64Ty)); in TEST()
273 EXPECT_FALSE(CastInst::isBitCastable(Int64Ty, V2Int32PtrTy)); in TEST()
274 EXPECT_TRUE(CastInst::isBitCastable(V2Int64PtrTy, V2Int32PtrTy)); in TEST()
275 EXPECT_TRUE(CastInst::isBitCastable(V2Int32PtrTy, V2Int64PtrTy)); in TEST()
276 EXPECT_FALSE(CastInst::isBitCastable(V2Int32Ty, V2Int64Ty)); in TEST()
277 EXPECT_FALSE(CastInst::isBitCastable(V2Int64Ty, V2Int32Ty)); in TEST()
280 EXPECT_FALSE(CastInst::castIsValid(Instruction::BitCast, in TEST()
283 EXPECT_FALSE(CastInst::castIsValid(Instruction::BitCast, in TEST()
287 EXPECT_FALSE(CastInst::castIsValid(Instruction::AddrSpaceCast, in TEST()
290 EXPECT_FALSE(CastInst::castIsValid(Instruction::AddrSpaceCast, in TEST()
296 EXPECT_FALSE(CastInst::castIsValid( in TEST()
299 EXPECT_FALSE(CastInst::castIsValid(Instruction::AddrSpaceCast, in TEST()
304 EXPECT_FALSE(CastInst::castIsValid( in TEST()
307 EXPECT_FALSE(CastInst::castIsValid(Instruction::AddrSpaceCast, in TEST()
310 EXPECT_TRUE(CastInst::castIsValid(Instruction::AddrSpaceCast, in TEST()
314 EXPECT_TRUE(CastInst::castIsValid( in TEST()
318 EXPECT_FALSE(CastInst::castIsValid(Instruction::AddrSpaceCast, in TEST()
323 EXPECT_FALSE(CastInst::castIsValid(Instruction::BitCast, in TEST()
326 EXPECT_FALSE(CastInst::castIsValid(Instruction::BitCast, in TEST()
329 EXPECT_FALSE(CastInst::castIsValid(Instruction::BitCast, in TEST()
332 EXPECT_FALSE(CastInst::castIsValid(Instruction::BitCast, in TEST()
335 EXPECT_FALSE(CastInst::castIsValid(Instruction::BitCast, in TEST()
338 EXPECT_FALSE(CastInst::castIsValid(Instruction::BitCast, in TEST()
343 EXPECT_TRUE(CastInst::castIsValid(Instruction::BitCast, in TEST()
346 EXPECT_TRUE(CastInst::castIsValid(Instruction::BitCast, in TEST()
349 EXPECT_FALSE(CastInst::castIsValid(Instruction::BitCast, in TEST()
352 EXPECT_FALSE(CastInst::castIsValid(Instruction::BitCast, in TEST()
357 EXPECT_FALSE(CastInst::castIsValid(Instruction::BitCast, in TEST()
360 EXPECT_FALSE(CastInst::castIsValid(Instruction::BitCast, in TEST()
369 auto Inst1 = CastInst::CreatePointerCast(NullV2I32Ptr, V2Int32Ty, "foo", BB); in TEST()
372 auto Inst1VScale = CastInst::CreatePointerCast( in TEST()
376 auto Inst2 = CastInst::CreatePointerCast(NullV2I32Ptr, V2Int32Ty); in TEST()
378 CastInst::CreatePointerCast(NullVScaleV2I32Ptr, VScaleV2Int32Ty); in TEST()
408 CastInst *PtrVecA = new IntToPtrInst(C2xi32a, V2xi32PTy); in TEST()
409 CastInst *PtrVecB = new IntToPtrInst(C2xi32b, V2xi32PTy); in TEST()
425 CastInst *BTC0 = new BitCastInst(Gep0, V2xi8PTy); in TEST()
426 CastInst *BTC1 = new BitCastInst(Gep1, V2xi8PTy); in TEST()
427 CastInst *BTC2 = new BitCastInst(Gep2, V2xi8PTy); in TEST()
428 CastInst *BTC3 = new BitCastInst(Gep3, V2xi8PTy); in TEST()
514 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::PtrToInt, in TEST()
515 CastInst::IntToPtr, in TEST()
518 CastInst::BitCast); in TEST()
522 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::PtrToInt, in TEST()
523 CastInst::IntToPtr, in TEST()
526 CastInst::BitCast); in TEST()
530 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::PtrToInt, in TEST()
531 CastInst::IntToPtr, in TEST()
537 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::IntToPtr, in TEST()
538 CastInst::PtrToInt, in TEST()
541 CastInst::BitCast); in TEST()
544 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::IntToPtr, in TEST()
545 CastInst::PtrToInt, in TEST()
563 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::IntToPtr, in TEST()
564 CastInst::AddrSpaceCast, in TEST()
570 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::AddrSpaceCast, in TEST()
571 CastInst::PtrToInt, in TEST()
577 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::IntToPtr, in TEST()
578 CastInst::BitCast, in TEST()
581 CastInst::IntToPtr); in TEST()