search for: castop

Displaying 12 results from an estimated 12 matches for "castop".

Did you mean: castor
2019 Oct 30
2
pointer arithmetic with address space attribute not working
...__((address_space(1))) void __user * test(void __user *arg) { #ifdef ADD return arg + 4; #else return arg; #endif } -bash-4.4$ -bash-4.4$ clang -g -c test.c -bash-4.4$ clang -g -c -DADD test.c clang-10: ../lib/IR/Instructions.cpp:2749: static llvm::CastInst *llvm::CastInst::Create(Instruction::CastOps, llvm::Value *, llvm::Type *, const llvm::Twine &, llvm::Instruction *): Assertion `castIsValid(op, S, Ty) && "Invalid cast!"' failed. Stack dump: 0. Program arguments: /data/users/yhs/work/llvm-project/llvm/build/install/bin/clang-10 -cc1 -triple x86_64-unknown-linu...
2014 Jan 20
2
[LLVMdev] Methods on addrspace pointers
...t; 3 libsystem_platform.dylib 000000000000000000 _sigtramp + 2145151600 > 4 clang-3.4 0x0000000103952ab6 abort + 22 > 5 clang-3.4 0x0000000103952a91 __assert_rtn + 81 > 6 clang-3.4 0x000000010385f8bf llvm::CastInst::Create(llvm::Instruction::CastOps, llvm::Value*, llvm::Type*, llvm::Twine const&, llvm::Instruction*) + 687 > 7 clang-3.4 0x00000001030a4d1c llvm::IRBuilder<true, llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true> >::CreateCast(llvm::Instruction::CastOps, llvm::Value*, llvm::Type*, llvm::...
2019 Oct 31
2
pointer arithmetic with address space attribute not working
...__((address_space(1))) void __user * test(void __user *arg) { #ifdef ADD return arg + 4; #else return arg; #endif } -bash-4.4$ -bash-4.4$ clang -g -c test.c -bash-4.4$ clang -g -c -DADD test.c clang-10: ../lib/IR/Instructions.cpp:2749: static llvm::CastInst *llvm::CastInst::Create(Instruction::CastOps, llvm::Value *, llvm::Type *, const llvm::Twine &, llvm::Instruction *): Assertion `castIsValid(op, S, Ty) && "Invalid cast!"' failed. Stack dump: 0. Program arguments: /data/users/yhs/work/llvm-project/llvm/build/install/bin/clang-10 -cc1 -triple x86_64-unknown-linu...
2010 May 16
1
[LLVMdev] How to access the return value of a CallInst
...x000000310ac0e930 3 libc.so.6 0x000000310a030265 gsignal + 53 4 libc.so.6 0x000000310a031d10 abort + 272 5 libc.so.6 0x000000310a0296e6 __assert_fail + 246 6 opt 0x00000000007aad58 7 opt 0x00000000007aae33 llvm::CastInst::Create(llvm::Instruction::CastOps, llvm::Value*, llvm::Type const*, llvm::Twine const&, llvm::Instruction*) + 211 8 opt 0x00000000004f4695 llvm::RSProfilers_std::InstrumentLoadStoreInBlock(llvm::BasicBlock*, llvm::GlobalValue*, llvm::GlobalValue*, llvm::GlobalValue*, llvm::GlobalValue*, llvm::GlobalValue*, llvm::...
2019 Oct 31
2
pointer arithmetic with address space attribute not working
...{ > #ifdef ADD > return arg + 4; > #else > return arg; > #endif > } > -bash-4.4$ > > -bash-4.4$ clang -g -c test.c > -bash-4.4$ clang -g -c -DADD test.c > clang-10: ../lib/IR/Instructions.cpp:2749: static llvm::CastInst > *llvm::CastInst::Create(Instruction::CastOps, llvm::Value *, > llvm::Type *, const llvm::Twine > &, llvm::Instruction *): Assertion `castIsValid(op, S, Ty) && "Invalid > cast!"' failed. > Stack dump: > 0. Program arguments: > /data/users/yhs/work/llvm-project/llvm/build/install/bin/clang-10 -c...
2011 Apr 06
0
[LLVMdev] Incompatible types at call site
...ypHeader*, i64, i64)* @Cyclotomic (%struct.TypHeader* %tmp62, i64 %tmp24, i64 1) nounwind <%struct.TypHeader*> [#uses=1] The way InstCombine manages this, is (from InstCombineCalls.cpp:1039) if ((*AI)->getType() == ParamTy) { Args.push_back(*AI); } else { Instruction::CastOps opcode = CastInst::getCastOpcode(*AI, false, ParamTy, false); Args.push_back(Builder->CreateCast(opcode, *AI, ParamTy, "tmp")); } When it asks for the castOpcode, it assumes both types are unsigned(indicated by the false arguments). Is it correct to assume this?...
2011 Apr 05
2
[LLVMdev] Incompatible types at call site
On Tue, Apr 5, 2011 at 1:44 PM, Duncan Sands <baldrick at free.fr> wrote: > Hi Arushi, > > > %tmp63 = call %struct.TypHeader* (...)* bitcast (%struct.TypHeader* >> (%struct.TypHeader*, i64, i64)* @Cyclotomic to %struct.TypHeader* >> (...)*)(%struct.TypHeader* %tmp62, i64 %tmp24, i32 1) nounwind, !dbg !907 >> ; >> <%struct.TypHeader*> [#uses=1]
2007 Dec 17
0
[LLVMdev] Elsa and LLVM and LLVM submissions
...ruction::IntToPtr, V, DestTy, Name); > + } > + Value *CreateBitCast(Value *V, const Type *DestTy, > + const char *Name = "") { > + return CreateCast(Instruction::BitCast, V, DestTy, Name); > + } > + > + Value *CreateCast(Instruction::CastOps Op, Value *V, const Type > *DestTy, > + const char *Name = "") { > + if (Constant *VC = dyn_cast<Constant>(V)) > + return ConstantExpr::getCast(Op, VC, DestTy); > + return LLVMBuilder::CreateCast(Op, V, DestTy, Name); > + } >...
2010 Feb 07
3
[LLVMdev] Help with Mac OS X 10.6.2 build
...from: BinaryExprAST::Codegen() in ccHkdHVT.o BinaryExprAST::Codegen() in ccHkdHVT.o "llvm::ConstantExpr::getAdd(llvm::Constant*, llvm::Constant*)", referenced from: BinaryExprAST::Codegen() in ccHkdHVT.o "llvm::CastInst::Create(llvm::Instruction::CastOps, llvm::Value*, llvm::Type const*, llvm::Twine const&, llvm::Instruction*)", referenced from: BinaryExprAST::Codegen() in ccHkdHVT.o "llvm::verifyFunction(llvm::Function const&, llvm::VerifierFailureAction)", referenced from: FunctionAST::Codegen() in...
2007 Dec 17
2
[LLVMdev] Elsa and LLVM and LLVM submissions
Devang Patel wrote: > On Dec 15, 2007, at 12:15 PM, Richard Pennington wrote: > >> I got the current version of LLVM via svn yesterday and modified my >> code to >> use the LLVMFoldingBuilder. Very nice! >> >> My question is this: I noticed that the folding builder doesn't fold >> some >> operations, e.g. casts. Is there some reason why? If
2010 Feb 07
0
[LLVMdev] Help with Mac OS X 10.6.2 build
...odegen() in ccHkdHVT.o > BinaryExprAST::Codegen() in ccHkdHVT.o > "llvm::ConstantExpr::getAdd(llvm::Constant*, llvm::Constant*)", > referenced from: > BinaryExprAST::Codegen() in ccHkdHVT.o > "llvm::CastInst::Create(llvm::Instruction::CastOps, llvm::Value*, > llvm::Type const*, llvm::Twine const&, llvm::Instruction*)", > referenced from: > BinaryExprAST::Codegen() in ccHkdHVT.o > "llvm::verifyFunction(llvm::Function const&, > llvm::VerifierFailureAction)", referenced from: >...
2011 Feb 04
3
[LLVMdev] ConstantBuilder proposal
...onstant *GetNUWMul(Constant *C1, Constant *C2) { return ConstantExpr::getNUWMul(C1, C2); } static Constant *GetExactSDiv(Constant *C1, Constant *C2) { return ConstantExpr::getExactSDiv(C1, C2); } // @brief Convenience function for getting one of the casting operations // using a CastOps opcode. static Constant *GetCast( unsigned ops, ///< The opcode for the conversion Constant *C, ///< The constant to be converted const Type *Ty ///< The type to which the constant is converted ) { return ConstantExpr::getCast(ops, C, Ty); } // @brief Create a...