* sparse linear instruction offset for memops
@ 2017-03-12 14:46 Dibyendu Majumdar
2017-03-12 17:27 ` Luc Van Oostenryck
0 siblings, 1 reply; 2+ messages in thread
From: Dibyendu Majumdar @ 2017-03-12 14:46 UTC (permalink / raw)
To: Linux-Sparse
Hi
I am investigating a crash in the avltree test program I mentioned
before. I noticed the following:
Linearised output:
load.64 %r338 <- -16[%r333]
LLVM output:
%10 = getelementptr inbounds i8, i8* %9, i64 4294967280
Instead of -16 we are getting a garbage offset. This appears to be
caused by the fact that the offset field in the instruction is
unsigned. Should the offset be a signed field instead?
Regards
Dibyendu
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: sparse linear instruction offset for memops
2017-03-12 14:46 sparse linear instruction offset for memops Dibyendu Majumdar
@ 2017-03-12 17:27 ` Luc Van Oostenryck
0 siblings, 0 replies; 2+ messages in thread
From: Luc Van Oostenryck @ 2017-03-12 17:27 UTC (permalink / raw)
To: Dibyendu Majumdar; +Cc: Linux-Sparse
On Sun, Mar 12, 2017 at 02:46:18PM +0000, Dibyendu Majumdar wrote:
> Hi
>
> I am investigating a crash in the avltree test program I mentioned
> before. I noticed the following:
>
> Linearised output:
>
> load.64 %r338 <- -16[%r333]
>
> LLVM output:
>
> %10 = getelementptr inbounds i8, i8* %9, i64 4294967280
>
> Instead of -16 we are getting a garbage offset. This appears to be
> caused by the fact that the offset field in the instruction is
> unsigned. Should the offset be a signed field instead?
It's not the problem here, I think.
The LLVM instruction is an *inbound* GEP, so there is no reasons
to use a negative offset as it would automatically be out-of-bound.
The GEP is unappropriate here, the correct code should really
subtract the offset from the pointer and then use this as the
load address.
-- Luc Van Oostenryck
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-12 17:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-12 14:46 sparse linear instruction offset for memops Dibyendu Majumdar
2017-03-12 17:27 ` Luc Van Oostenryck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox