[llvm] r303800 - [AArch64] Prevent nested ADDs from address calc in splitStoreSplat. NFC

Nirav Davé via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 12:01:54 PDT 2017


Ah! Of course. I'll go fix that.

Thanks,

-Nirav

On Thu, May 25, 2017 at 2:55 PM, Friedman, Eli <efriedma at codeaurora.org>
wrote:

> On 5/25/2017 9:10 AM, Nirav Davé wrote:
>
>> Hmm. Wrapping was why I had it signed (I was looking at a negative
>> BaseOffset). I believe we want the signed interpretation for the constant
>> here.
>>
>> That said, it looks like getConstant only accepts a uint64_t so we are
>> implicitly casting. The internal ConstantInt the value is fed into does
>> allow it to be interpreted as signed. Presumably we do not have signed
>> constant nodes to improve constant sharing. I wonder if it's worth
>> propagating signedness throughout to explicitly avoid any
>> overflow/underflow problems.
>>
>
> The overflow/underflow problem here is that if you build LLVM with
> -fsanitize=undefined, it will crash here trying to fold the addition in
> certain cases.  Hence the suggestion to use uint64_t, which wraps the same
> way ISD::ADD does.
>
> (We don't have signed/unsigned integer constants because we don't have
> signed/unsigned integer types in IR.)
>
>
> -Eli
>
> --
> Employee of Qualcomm Innovation Center, Inc.
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux
> Foundation Collaborative Project
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170525/211f1db2/attachment.html>


More information about the llvm-commits mailing list