Displaying 4 results from an estimated 4 matches for "dupinst".
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
...eFAdd(emptyVec, emptyVec, instName);
std::cout << " dupVal " << *dupVal << "\n";
It outputs: dupVal <2 x double> <double fadd (double undef, double undef),
double fadd (double undef, double undef)>
If I dyn_cast the dupVal to instruction type (dupInst) and print dupInst,
it outputs: "dupInst printing a <null> value"
But if I use Instruction *dupInst = (Instruction *) dupVal and print it,
I'll get:
dupInst <2 x double> <double fadd (double undef, double undef), double fadd
(double undef, double undef)>
It seems th...
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
...::cout << " dupVal " << *dupVal << "\n";
>>
>> It outputs: dupVal <2 x double> <double fadd (double undef, double
>> undef), double fadd (double undef, double undef)>
>>
>> If I dyn_cast the dupVal to instruction type (dupInst) and print
>> dupInst, it outputs: "dupInst printing a <null> value"
>> But if I use Instruction *dupInst = (Instruction *) dupVal and print it,
>> I'll get:
>> dupInst <2 x double> <double fadd (double undef, double undef), double
>> fadd...
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
...ot; << *dupVal << "\n";
>>
>> It outputs: dupVal <2 x double> <double fadd (double undef,
>> double
>> undef), double fadd (double undef, double undef)>
>>
>> If I dyn_cast the dupVal to instruction type (dupInst) and print
>> dupInst, it outputs: "dupInst printing a <null> value"
>> But if I use Instruction *dupInst = (Instruction *) dupVal and
>> print it,
>> I'll get:
>> dupInst <2 x double> <double fadd (d...
2015 Apr 17
2
[LLVMdev] how to use "new instruction()"
Value * is the instruction.
use dyn_cast<Instruction> to get to it.
On Thu, Apr 16, 2015 at 11:39 PM zhi chen <zchenhn at gmail.com> wrote:
> But IRBuilder.CreateXYZ only returns a "VALUE" type. Can I get the
> instruction created by it? For example,
>
> IRBuilder<> builder(&*pinst);
> Value *val = builder.CreateFAdd(LV, RV, "");
>