Home
last modified time | relevance | path

Searched refs:CastInst (Results 1 – 25 of 144) sorted by relevance

123456

/external/llvm/unittests/IR/
DInstructionsTest.cpp171 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()
[all …]
DValueHandleTest.cpp105 AssertingVH<CastInst> AVH(BitcastV.get()); in TEST_F()
106 CastInst *implicit_to_exact_type = AVH; in TEST_F()
121 const CastInst *ConstBitcast = BitcastV.get(); in TEST_F()
122 AssertingVH<const CastInst> AVH(ConstBitcast); in TEST_F()
123 const CastInst *implicit_to_exact_type = AVH; in TEST_F()
169 EXPECT_EQ(sizeof(CastInst *), sizeof(AssertingVH<CastInst>)); in TEST_F()
/external/swiftshader/third_party/LLVM/include/llvm/Support/
DInstVisitor.h178 RetTy visitTruncInst(TruncInst &I) { DELEGATE(CastInst); } in visitTruncInst()
179 RetTy visitZExtInst(ZExtInst &I) { DELEGATE(CastInst); } in visitZExtInst()
180 RetTy visitSExtInst(SExtInst &I) { DELEGATE(CastInst); } in visitSExtInst()
181 RetTy visitFPTruncInst(FPTruncInst &I) { DELEGATE(CastInst); } in visitFPTruncInst()
182 RetTy visitFPExtInst(FPExtInst &I) { DELEGATE(CastInst); } in visitFPExtInst()
183 RetTy visitFPToUIInst(FPToUIInst &I) { DELEGATE(CastInst); } in visitFPToUIInst()
184 RetTy visitFPToSIInst(FPToSIInst &I) { DELEGATE(CastInst); } in visitFPToSIInst()
185 RetTy visitUIToFPInst(UIToFPInst &I) { DELEGATE(CastInst); } in visitUIToFPInst()
186 RetTy visitSIToFPInst(SIToFPInst &I) { DELEGATE(CastInst); } in visitSIToFPInst()
187 RetTy visitPtrToIntInst(PtrToIntInst &I) { DELEGATE(CastInst); } in visitPtrToIntInst()
[all …]
DNoFolder.h204 return CastInst::Create(Op, C, DestTy); in CreateCast()
207 return CastInst::CreatePointerCast(C, DestTy); in CreatePointerCast()
211 return CastInst::CreateIntegerCast(C, DestTy, isSigned); in CreateIntCast()
214 return CastInst::CreateFPCast(C, DestTy); in CreateFPCast()
227 return CastInst::CreateZExtOrBitCast(C, DestTy); in CreateZExtOrBitCast()
230 return CastInst::CreateSExtOrBitCast(C, DestTy); in CreateSExtOrBitCast()
234 return CastInst::CreateTruncOrBitCast(C, DestTy); in CreateTruncOrBitCast()
/external/swiftshader/third_party/LLVM/unittests/VMCore/
DInstructionsTest.cpp111 TEST(InstructionsTest, CastInst) { in TEST() argument
123 EXPECT_TRUE(CastInst::isCastable(V8x8Ty, X86MMXTy)); in TEST()
124 EXPECT_TRUE(CastInst::isCastable(X86MMXTy, V8x8Ty)); in TEST()
125 EXPECT_FALSE(CastInst::isCastable(Int64Ty, X86MMXTy)); in TEST()
126 EXPECT_TRUE(CastInst::isCastable(V8x64Ty, V8x8Ty)); in TEST()
127 EXPECT_TRUE(CastInst::isCastable(V8x8Ty, V8x64Ty)); in TEST()
128 EXPECT_EQ(CastInst::Trunc, CastInst::getCastOpcode(c64, true, V8x8Ty, true)); in TEST()
129 EXPECT_EQ(CastInst::SExt, CastInst::getCastOpcode(c8, true, V8x64Ty, true)); in TEST()
/external/llvm/include/llvm/IR/
DInstVisitor.h185 RetTy visitTruncInst(TruncInst &I) { DELEGATE(CastInst);} in visitTruncInst()
186 RetTy visitZExtInst(ZExtInst &I) { DELEGATE(CastInst);} in visitZExtInst()
187 RetTy visitSExtInst(SExtInst &I) { DELEGATE(CastInst);} in visitSExtInst()
188 RetTy visitFPTruncInst(FPTruncInst &I) { DELEGATE(CastInst);} in visitFPTruncInst()
189 RetTy visitFPExtInst(FPExtInst &I) { DELEGATE(CastInst);} in visitFPExtInst()
190 RetTy visitFPToUIInst(FPToUIInst &I) { DELEGATE(CastInst);} in visitFPToUIInst()
191 RetTy visitFPToSIInst(FPToSIInst &I) { DELEGATE(CastInst);} in visitFPToSIInst()
192 RetTy visitUIToFPInst(UIToFPInst &I) { DELEGATE(CastInst);} in visitUIToFPInst()
193 RetTy visitSIToFPInst(SIToFPInst &I) { DELEGATE(CastInst);} in visitSIToFPInst()
194 RetTy visitPtrToIntInst(PtrToIntInst &I) { DELEGATE(CastInst);} in visitPtrToIntInst()
[all …]
DInstrTypes.h564 class CastInst : public UnaryInstruction {
569 CastInst(Type *Ty, unsigned iType, Value *S,
575 CastInst(Type *Ty, unsigned iType, Value *S,
588 static CastInst *Create(
601 static CastInst *Create(
610 static CastInst *CreateZExtOrBitCast(
618 static CastInst *CreateZExtOrBitCast(
626 static CastInst *CreateSExtOrBitCast(
634 static CastInst *CreateSExtOrBitCast(
642 static CastInst *CreatePointerCast(
[all …]
DNoFolder.h217 return CastInst::Create(Op, C, DestTy); in CreateCast()
220 return CastInst::CreatePointerCast(C, DestTy); in CreatePointerCast()
224 return CastInst::CreateIntegerCast(C, DestTy, isSigned); in CreateIntCast()
227 return CastInst::CreateFPCast(C, DestTy); in CreateFPCast()
240 return CastInst::CreateZExtOrBitCast(C, DestTy); in CreateZExtOrBitCast()
243 return CastInst::CreateSExtOrBitCast(C, DestTy); in CreateSExtOrBitCast()
247 return CastInst::CreateTruncOrBitCast(C, DestTy); in CreateTruncOrBitCast()
/external/swiftshader/third_party/LLVM/include/llvm/
DInstrTypes.h390 class CastInst : public UnaryInstruction {
393 CastInst(Type *Ty, unsigned iType, Value *S,
399 CastInst(Type *Ty, unsigned iType, Value *S,
411 static CastInst *Create(
424 static CastInst *Create(
433 static CastInst *CreateZExtOrBitCast(
441 static CastInst *CreateZExtOrBitCast(
449 static CastInst *CreateSExtOrBitCast(
457 static CastInst *CreateSExtOrBitCast(
465 static CastInst *CreatePointerCast(
[all …]
/external/llvm/lib/Transforms/Scalar/
DConstantHoisting.cpp124 if (auto CastInst = dyn_cast<Instruction>(Opnd)) in findMatInsertPt() local
125 if (CastInst->isCast()) in findMatInsertPt()
126 return CastInst; in findMatInsertPt()
249 if (auto CastInst = dyn_cast<Instruction>(Opnd)) { in collectConstantCandidates() local
252 if (!CastInst->isCast()) in collectConstantCandidates()
255 if (auto *ConstInt = dyn_cast<ConstantInt>(CastInst->getOperand(0))) { in collectConstantCandidates()
502 if (auto CastInst = dyn_cast<Instruction>(Opnd)) { in emitBaseConstants() local
503 assert(CastInst->isCast() && "Expected an cast instruction!"); in emitBaseConstants()
506 Instruction *&ClonedCastInst = ClonedCastMap[CastInst]; in emitBaseConstants()
508 ClonedCastInst = CastInst->clone(); in emitBaseConstants()
[all …]
/external/swiftshader/third_party/LLVM/lib/Transforms/Instrumentation/
DProfilingUtils.cpp73 Instruction::CastOps opcode = CastInst::getCastOpcode(AI, false, ArgVTy, in InsertProfilingInitCall()
76 CastInst::Create(opcode, AI, ArgVTy, "argv.cast", InitCall)); in InsertProfilingInitCall()
89 opcode = CastInst::getCastOpcode(InitCall, true, AI->getType(), true); in InsertProfilingInitCall()
91 CastInst::Create(opcode, InitCall, AI->getType(), "", InsertPos)); in InsertProfilingInitCall()
93 opcode = CastInst::getCastOpcode(AI, true, in InsertProfilingInitCall()
96 CastInst::Create(opcode, AI, Type::getInt32Ty(Context), in InsertProfilingInitCall()
/external/swiftshader/third_party/LLVM/lib/VMCore/
DInstructions.cpp369 ArraySize = CastInst::CreateIntegerCast(ArraySize, IntPtrTy, false, in createMalloc()
372 ArraySize = CastInst::CreateIntegerCast(ArraySize, IntPtrTy, false, in createMalloc()
2002 bool CastInst::isIntegerCast() const { in isIntegerCast()
2015 bool CastInst::isLosslessCast() const { in isLosslessCast()
2040 bool CastInst::isNoopCast(Instruction::CastOps Opcode, in isNoopCast()
2069 bool CastInst::isNoopCast(Type *IntPtrTy) const { in isNoopCast()
2081 unsigned CastInst::isEliminableCastPair( in isEliminableCastPair()
2248 CastInst *CastInst::Create(Instruction::CastOps op, Value *S, Type *Ty, in Create()
2271 CastInst *CastInst::Create(Instruction::CastOps op, Value *S, Type *Ty, in Create()
2294 CastInst *CastInst::CreateZExtOrBitCast(Value *S, Type *Ty, in CreateZExtOrBitCast()
[all …]
/external/swiftshader/third_party/LLVM/lib/Analysis/
DPHITransAddr.cpp29 if (isa<CastInst>(Inst) && in CanPHITrans()
188 if (CastInst *Cast = dyn_cast<CastInst>(Inst)) { in PHITranslateSubExpr()
206 if (CastInst *CastI = dyn_cast<CastInst>(*UI)) in PHITranslateSubExpr()
383 if (CastInst *Cast = dyn_cast<CastInst>(Inst)) { in InsertPHITranslatedSubExpr()
390 CastInst *New = CastInst::Create(Cast->getOpcode(), in InsertPHITranslatedSubExpr()
/external/llvm/lib/IR/
DInstructions.cpp458 ArraySize = CastInst::CreateIntegerCast(ArraySize, IntPtrTy, false, in createMalloc()
461 ArraySize = CastInst::CreateIntegerCast(ArraySize, IntPtrTy, false, in createMalloc()
2326 void CastInst::anchor() {} in anchor()
2329 bool CastInst::isIntegerCast() const { in isIntegerCast()
2342 bool CastInst::isLosslessCast() const { in isLosslessCast()
2367 bool CastInst::isNoopCast(Instruction::CastOps Opcode, in isNoopCast()
2397 bool CastInst::isNoopCast(Type *IntPtrTy) const { in isNoopCast()
2401 bool CastInst::isNoopCast(const DataLayout &DL) const { in isNoopCast()
2422 unsigned CastInst::isEliminableCastPair( in isEliminableCastPair()
2646 CastInst *CastInst::Create(Instruction::CastOps op, Value *S, Type *Ty, in Create()
[all …]
/external/llvm/lib/Analysis/
DPHITransAddr.cpp30 if (isa<CastInst>(Inst) && in CanPHITrans()
190 if (CastInst *Cast = dyn_cast<CastInst>(Inst)) { in PHITranslateSubExpr()
207 if (CastInst *CastI = dyn_cast<CastInst>(U)) in PHITranslateSubExpr()
384 if (CastInst *Cast = dyn_cast<CastInst>(Inst)) { in InsertPHITranslatedSubExpr()
391 CastInst *New = CastInst::Create(Cast->getOpcode(), OpVal, InVal->getType(), in InsertPHITranslatedSubExpr()
DLoads.cpp164 if (isa<BinaryOperator>(A) || isa<CastInst>(A) || isa<PHINode>(A) || in AreEquivalentAddressValues()
352 CastInst::isBitOrNoopPointerCastable(LI->getType(), AccessTy, DL)) { in FindAvailableLoadedValue()
372 CastInst::isBitOrNoopPointerCastable(SI->getValueOperand()->getType(), in FindAvailableLoadedValue()
DLoopUnrollAnalyzer.cpp139 bool UnrolledInstAnalyzer::visitCastInst(CastInst &I) { in visitCastInst()
150 if (COp && CastInst::castIsValid(I.getOpcode(), COp, I.getType())) { in visitCastInst()
/external/swiftshader/third_party/LLVM/unittests/Support/
DValueHandleTest.cpp109 AssertingVH<CastInst> AVH(BitcastV.get()); in TEST_F()
110 CastInst *implicit_to_exact_type = AVH; in TEST_F()
125 const CastInst *ConstBitcast = BitcastV.get(); in TEST_F()
126 AssertingVH<const CastInst> AVH(ConstBitcast); in TEST_F()
127 const CastInst *implicit_to_exact_type = AVH; in TEST_F()
173 EXPECT_EQ(sizeof(CastInst *), sizeof(AssertingVH<CastInst>)); in TEST_F()
/external/llvm/lib/Transforms/InstCombine/
DInstCombineCasts.cpp201 Res = CastInst::CreateIntegerCast(I->getOperand(0), Ty, in EvaluateInDifferentType()
234 isEliminableCastPair(const CastInst *CI, ///< First cast instruction in isEliminableCastPair()
250 unsigned Res = CastInst::isEliminableCastPair(firstOp, secondOp, SrcTy, MidTy, in isEliminableCastPair()
274 if (const CastInst *CI = dyn_cast<CastInst>(V)) in ShouldOptimizeCast()
288 Instruction *InstCombiner::commonCastTransforms(CastInst &CI) { in commonCastTransforms()
293 if (CastInst *CSrc = dyn_cast<CastInst>(Src)) { // A->B->C cast in commonCastTransforms()
298 return CastInst::Create(opc, CSrc->getOperand(0), CI.getType()); in commonCastTransforms()
542 return CastInst::CreateIntegerCast(Shift, DestTy, false); in visitTrunc()
561 return CastInst::CreateIntegerCast(Shift, CI.getType(), true); in visitTrunc()
658 return CastInst::CreateIntegerCast(In, CI.getType(), false/*ZExt*/); in transformZExtICmp()
[all …]
DInstCombineInternal.h290 Instruction *commonCastTransforms(CastInst &CI);
291 Instruction *commonPointerCastTransforms(CastInst &CI);
296 Instruction *visitFPExt(CastInst &CI);
299 Instruction *visitUIToFP(CastInst &CI);
300 Instruction *visitSIToFP(CastInst &CI);
/external/swiftshader/third_party/LLVM/lib/Transforms/InstCombine/
DInstCombineCasts.cpp197 Res = CastInst::CreateIntegerCast(I->getOperand(0), Ty, in EvaluateInDifferentType()
231 const CastInst *CI, ///< The first cast instruction in isEliminableCastPair()
244 unsigned Res = CastInst::isEliminableCastPair(firstOp, secondOp, SrcTy, MidTy, in isEliminableCastPair()
270 if (const CastInst *CI = dyn_cast<CastInst>(V)) in ShouldOptimizeCast()
284 Instruction *InstCombiner::commonCastTransforms(CastInst &CI) { in commonCastTransforms()
289 if (CastInst *CSrc = dyn_cast<CastInst>(Src)) { // A->B->C cast in commonCastTransforms()
294 return CastInst::Create(opc, CSrc->getOperand(0), CI.getType()); in commonCastTransforms()
485 return CastInst::CreateIntegerCast(Shift, CI.getType(), false); in visitTrunc()
581 return CastInst::CreateIntegerCast(In, CI.getType(), false/*ZExt*/); in transformZExtICmp()
963 return CastInst::CreateIntegerCast(In, CI.getType(), true/*SExt*/); in transformSExtICmp()
[all …]
DInstCombine.h157 Instruction *commonCastTransforms(CastInst &CI);
158 Instruction *commonPointerCastTransforms(CastInst &CI);
163 Instruction *visitFPExt(CastInst &CI);
166 Instruction *visitUIToFP(CastInst &CI);
167 Instruction *visitSIToFP(CastInst &CI);
DInstCombineAndOrXor.cpp1226 if (CastInst *Op0C = dyn_cast<CastInst>(Op0)) in visitAnd()
1227 if (CastInst *Op1C = dyn_cast<CastInst>(Op1)) { in visitAnd()
1238 return CastInst::Create(Op0C->getOpcode(), NewOp, I.getType()); in visitAnd()
1246 return CastInst::Create(Op0C->getOpcode(), Res, I.getType()); in visitAnd()
1253 return CastInst::Create(Op0C->getOpcode(), Res, I.getType()); in visitAnd()
2009 if (CastInst *Op0C = dyn_cast<CastInst>(Op0)) { in visitOr()
2010 CastInst *Op1C = dyn_cast<CastInst>(Op1); in visitOr()
2023 return CastInst::Create(Op0C->getOpcode(), NewOp, I.getType()); in visitOr()
2031 return CastInst::Create(Op0C->getOpcode(), Res, I.getType()); in visitOr()
2038 return CastInst::Create(Op0C->getOpcode(), Res, I.getType()); in visitOr()
[all …]
/external/llvm/include/llvm/Transforms/Utils/
DSimplifyIndVar.h23 class CastInst; variable
44 virtual void visitCast(CastInst *Cast) = 0;
/external/spirv-llvm/lib/SPIRV/
DSPIRVToOCL20.cpp79 void visitCastInst(CastInst &CI);
257 CastInst::CreateIntegerCast(getImageSize, CI->getType()->getScalarType(), false, in visitCallSPRIVImageQuerySize()
274 CastInst::CreateIntegerCast(getImageSize, in visitCallSPRIVImageQuerySize()
320 CastInst::CreateIntegerCast(getImageArraySize, CI->getType()->getScalarType(), in visitCallSPRIVImageQuerySize()
470 P = CastInst::CreatePointerBitCastOrAddrSpaceCast(P, NewTy, "", CI); in visitCallSPIRVPipeBuiltin()
510 void SPIRVToOCL20::visitCastInst(CastInst &Cast) { in visitCastInst()

123456