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 CastInst::CreatePointerCast(NullV2I32Ptr, V2Int32Ty, "foo", BB); in TEST()
287 CastInst::CreatePointerCast(NullV2I32Ptr, V2Int32Ty); in TEST()
311 CastInst *PtrVecA = new IntToPtrInst(C2xi32a, V2xi32PTy); in TEST()
312 CastInst *PtrVecB = new IntToPtrInst(C2xi32b, V2xi32PTy); in TEST()
328 CastInst *BTC0 = new BitCastInst(Gep0, V2xi8PTy); in TEST()
329 CastInst *BTC1 = new BitCastInst(Gep1, V2xi8PTy); in TEST()
330 CastInst *BTC2 = new BitCastInst(Gep2, V2xi8PTy); in TEST()
331 CastInst *BTC3 = new BitCastInst(Gep3, V2xi8PTy); in TEST()
417 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::PtrToInt, in TEST()
418 CastInst::IntToPtr, in TEST()
421 CastInst::BitCast); in TEST()
425 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::PtrToInt, in TEST()
426 CastInst::IntToPtr, in TEST()
429 CastInst::BitCast); in TEST()
433 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::PtrToInt, in TEST()
434 CastInst::IntToPtr, in TEST()
440 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::IntToPtr, in TEST()
441 CastInst::PtrToInt, in TEST()
444 CastInst::BitCast); in TEST()
447 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::IntToPtr, in TEST()
448 CastInst::PtrToInt, in TEST()
466 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::IntToPtr, in TEST()
467 CastInst::AddrSpaceCast, in TEST()
473 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::AddrSpaceCast, in TEST()
474 CastInst::PtrToInt, in TEST()
480 EXPECT_EQ(CastInst::isEliminableCastPair(CastInst::IntToPtr, in TEST()
481 CastInst::BitCast, in TEST()
484 CastInst::IntToPtr); in TEST()