<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 05/30/2013 06:12 AM, Pete Couperus
wrote:<br>
</div>
<blockquote
cite="mid:CAHmogP0b3zWU3tTuRmMVvab2LwXXpawYxWygKzGYuzKFgJ=n8w@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div dir="ltr">
<div>
<div>
<div>Hello,<br>
<br>
</div>
This is an interesting example. Whenever I see strange
things like this, I use opt's -lint.<br>
</div>
In this case, opt -lint reports:<br>
Undefined behavior: Call return type mismatches callee return
type<br>
%call = call float @alias_f32(float %tmp2) #1<br>
<br>
</div>
<div>You'll get a similar report when the parameter types
mismatch.<br>
<br>
</div>
<div>Pete<br>
</div>
</div>
</blockquote>
<br>
Is it really supposed to be undefined? The tests are checking for
specific behavior in these "undefined" cases.<br>
<br>
opt -lint < test/Transforms/InstCombine/call.ll<br>
<br>
Undefined behavior: Call argument type mismatches callee parameter
type<br>
call void bitcast (void (i8*)* @test1a to void (i32*)*)(i32* %A)<br>
Undefined behavior: Call argument type mismatches callee parameter
type<br>
call void bitcast (void (i8)* @test2a to void (i32)*)(i32 %A)<br>
Undefined behavior: Call return type mismatches callee return type<br>
%X = call i32 bitcast (i8 ()* @test4a to i32 ()*)()<br>
Undefined behavior: Call argument count mismatches callee argument
count<br>
%X = call i32 bitcast (i32 (i32)* @test6a to i32 ()*)()<br>
Undefined behavior: Call argument count mismatches callee argument
count<br>
call void bitcast (void ()* @test7a to void (i32)*)(i32 5)<br>
<br>
</body>
</html>