Displaying 2 results from an estimated 2 matches for "pr16483".
Did you mean:
16483
2013 Jun 28
0
[LLVMdev] Possible instruction combine bug with pointer icmp?
On Fri, Jun 28, 2013 at 6:13 AM, Richard Osborne <richard at xmos.com> wrote:
> If I give instcombine the following IR:
>
> define i1 @f([1 x i8]* %a, [1 x i8]* %b) {
> %c = getelementptr [1 x i8]* %a, i32 0, i32 0
> %d = getelementptr [1 x i8]* %b, i32 0, i32 0
> %cmp = icmp ult i8* %c, %d
> ret i1 %cmp
> }
>
> It optimizes it into:
>
> define i1
2013 Jun 28
2
[LLVMdev] Possible instruction combine bug with pointer icmp?
If I give instcombine the following IR:
define i1 @f([1 x i8]* %a, [1 x i8]* %b) {
%c = getelementptr [1 x i8]* %a, i32 0, i32 0
%d = getelementptr [1 x i8]* %b, i32 0, i32 0
%cmp = icmp ult i8* %c, %d
ret i1 %cmp
}
It optimizes it into:
define i1 @f([1 x i8]* %a, [1 x i8]* %b) {
%cmp = icmp slt [1 x i8]* %a, %b
ret i1 %cmp
}
Is this a bug, or are there some semantics of icmp