Displaying 5 results from an estimated 5 matches for "truncinst".
2010 May 16
1
[LLVMdev] How to access the return value of a CallInst
...turn_load", LI);
I assume that getCalledValue() will give me the return value of the
InitCall CallInst.
This compiles fine.
But the CastInst cannot be created. The runtime error is :
opt: /panfs/panasas-01.cs.wisc.edu/scratch/wang/LLVM/src/llvm/lib/VMCore/Instructions.cpp:2338:
llvm::TruncInst::TruncInst(llvm::Value*, const llvm::Type*, const
llvm::Twine&, llvm::Instruction*): Assertion `castIsValid(getOpcode(),
S, Ty) && "Illegal Trunc"' failed.
0 opt 0x000000000084e8bf
1 opt 0x000000000084f37a
2 libpthread.so.0 0x000000310ac0e930...
2011 Jan 24
3
[LLVMdev] How to change the type of an Instruction?
Hi,
Nick, thanks for the reply.
I still have a problem: I only need to "clone" an Instruction, changing its
type. That is, I would like to keep all characteristics of the old
Instruction and create a new one only with a different type. I am trying
create a new Instruction thus:
%3 = add nsw i32 %1, %2 ; <i16> [#uses=2] //Old Instruction
Value* Op0 = I->getOperand(0);
Value*
2012 Jul 31
0
[LLVMdev] rotate
Oh, no. I should have been more clear. The patch was not rejected, just
lost in the daily shuffle.
I already have my employer's approval to send this upstream, so I will
prepare a patch against trunk this morning.
> I proposed a similar patch to LLVM (left circular shift) around 10/2011.
> > Parts of my patch did make it into trunk about a year after, but others
> > did not.
2012 Jul 31
4
[LLVMdev] rotate
On Monday, July 30, 2012 12:16 AM, Cameron McInally wrote:
> Hey Andy,
>
> I proposed a similar patch to LLVM (left circular shift) around 10/2011.
> Parts of my patch did make it into trunk about a year after, but others
> did not.
>
> At that time, my solution was to add a binary operator to the IRBuilder,
> since LCS fits in nicely with the other shift operators. But,
2012 Jul 31
3
[LLVMdev] rotate
...HANDLE_MEMORY_INST(33, AtomicRMW , AtomicRMWInst )
+ LAST_MEMORY_INST(33)
// Cast operators ...
// NOTE: The order matters here because CastInst::isEliminableCastPair
// NOTE: (see Instructions.cpp) encodes a table based on this ordering.
- FIRST_CAST_INST(33)
-HANDLE_CAST_INST(33, Trunc , TruncInst ) // Truncate integers
-HANDLE_CAST_INST(34, ZExt , ZExtInst ) // Zero extend integers
-HANDLE_CAST_INST(35, SExt , SExtInst ) // Sign extend integers
-HANDLE_CAST_INST(36, FPToUI , FPToUIInst ) // floating point -> UInt
-HANDLE_CAST_INST(37, FPToSI , FPToSIInst ) // float...