Displaying 3 results from an estimated 3 matches for "alias_f32".
2013 May 30
3
[LLVMdev] Expected behavior of calling bitcasted functions?
Hi,
I'm not sure what the expected behavior of calling a bitcasted function is. Suppose you have a case like this (which you get on the source level from attribute alias):
@alias_f32 = alias bitcast (i32 (i32)* @func_i32 to float (float)*)
define internal i32 @func_i32(i32 %v) noinline nounwind {
entry:
ret i32 %v
}
define void @bitcast_alias_scalar(float* noalias %source, float* noalias %dest) nounwind {
entry:
%arrayidx = getelementptr float* %source, i32 0
%tmp2 = lo...
2013 May 30
0
[LLVMdev] Expected behavior of calling bitcasted functions?
Hello,
This is an interesting example. Whenever I see strange things like this, I
use opt's -lint.
In this case, opt -lint reports:
Undefined behavior: Call return type mismatches callee return type
%call = call float @alias_f32(float %tmp2) #1
You'll get a similar report when the parameter types mismatch.
Pete
On Wed, May 29, 2013 at 5:40 PM, Arsenault, Matthew <
Matthew.Arsenault at amd.com> wrote:
> Hi,
>
> I'm not sure what the expected behavior of calling a bitcasted function
> is. Supp...
2013 May 30
1
[LLVMdev] Expected behavior of calling bitcasted functions?
...0/2013 06:12 AM, Pete Couperus wrote:
> Hello,
>
> This is an interesting example. Whenever I see strange things like
> this, I use opt's -lint.
> In this case, opt -lint reports:
> Undefined behavior: Call return type mismatches callee return type
> %call = call float @alias_f32(float %tmp2) #1
>
> You'll get a similar report when the parameter types mismatch.
>
> Pete
Is it really supposed to be undefined? The tests are checking for
specific behavior in these "undefined" cases.
opt -lint < test/Transforms/InstCombine/call.ll
Undefined beha...