From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Dibyendu Majumdar <mobile@majumdar.org.uk>
Cc: Linux-Sparse <linux-sparse@vger.kernel.org>
Subject: Re: sparse linear instruction offset for memops
Date: Sun, 12 Mar 2017 18:27:13 +0100 [thread overview]
Message-ID: <20170312172712.nw7nsphvaqz44s2r@macpro.local> (raw)
In-Reply-To: <CACXZuxcS5c-QS-KzDjxMD6j5MVAJfKicDaKRR6V10NQTKqHLcg@mail.gmail.com>
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
prev parent reply other threads:[~2017-03-12 17:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-12 14:46 sparse linear instruction offset for memops Dibyendu Majumdar
2017-03-12 17:27 ` Luc Van Oostenryck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170312172712.nw7nsphvaqz44s2r@macpro.local \
--to=luc.vanoostenryck@gmail.com \
--cc=linux-sparse@vger.kernel.org \
--cc=mobile@majumdar.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox