Displaying 3 results from an estimated 3 matches for "bf6747e1".
2013 May 30
1
[LLVMdev] Expected behavior of calling bitcasted functions?
...6a to i32 ()*)()
Undefined behavior: Call argument count mismatches callee argument count
call void bitcast (void ()* @test7a to void (i32)*)(i32 5)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130530/bf6747e1/attachment.html>
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 <
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