Displaying 7 results from an estimated 7 matches for "castopcode".
Did you mean:
baseopcode
2011 Apr 06
3
[LLVMdev] Incompatible types at call site
Hi Arushi,
> When it asks for the castOpcode, it assumes both types are unsigned(indicated by
> the false arguments).
>
> Is it correct to assume this?
yes, because the behaviour of the original code was undefined.
Ciao, Duncan.
PS: This is the sort of thing that happens when a function is declared with a
prototype such as
void...
2011 Apr 06
0
[LLVMdev] Incompatible types at call site
...mic (%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?
Thanks,
Arushi
On Tue, Apr 5, 20...
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]
2016 Jul 21
2
Remove zext-unfolding from InstCombine
...f ((!isa<ICmpInst>(Cast0Src) || !isa<ICmpInst>(Cast1Src)) &&
shouldOptimizeCast(Cast0) && shouldOptimizeCast(Cast1)) {
Value *NewOp = Builder->CreateBinOp(LogicOpc, Cast0Src, Cast1Src,
I.getName());
return CastInst::Create(CastOpcode, NewOp, DestTy);
}
```
The `(!isa<ICmpInst>(Cast0Src) || !isa<ICmpInst>(Cast1Src))` part has been added by r48715 in order to ensure that InstCombine does not enter an endless loop, switching back and forth between the two transformations. There was also added an InstCombine test case...
2011 Apr 06
0
[LLVMdev] Incompatible types at call site
On Wed, Apr 6, 2011 at 1:41 AM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Arushi,
>
>
> When it asks for the castOpcode, it assumes both types are
>> unsigned(indicated by
>> the false arguments).
>>
>> Is it correct to assume this?
>>
>
> yes, because the behaviour of the original code was undefined.
>
> Ciao, Duncan.
>
> PS: This is the sort of thing that happens whe...
2016 Jul 27
2
Remove zext-unfolding from InstCombine
...>(Cast0Src) || !isa<ICmpInst>(Cast1Src)) &&
> shouldOptimizeCast(Cast0) && shouldOptimizeCast(Cast1)) {
> Value *NewOp = Builder->CreateBinOp(LogicOpc, Cast0Src, Cast1Src,
> I.getName());
> return CastInst::Create(CastOpcode, NewOp, DestTy);
> }
> ```
>
> The `(!isa<ICmpInst>(Cast0Src) || !isa<ICmpInst>(Cast1Src))` part has been added by r48715 in order to ensure that InstCombine does not enter an endless loop, switching back and forth between the two transformations. There was also added an In...
2016 Aug 04
2
Remove zext-unfolding from InstCombine
...sa<ICmpInst>(Cast1Src)) &&
> > shouldOptimizeCast(Cast0) && shouldOptimizeCast(Cast1)) {
> > Value *NewOp = Builder->CreateBinOp(LogicOpc, Cast0Src, Cast1Src,
> > I.getName());
> > return CastInst::Create(CastOpcode, NewOp, DestTy);
> > }
> > ```
> >
> > The `(!isa<ICmpInst>(Cast0Src) || !isa<ICmpInst>(Cast1Src))` part has been added by r48715 in order to ensure that InstCombine does not enter an endless loop, switching back and forth between the two transformations. There w...