How to track down a bad llvm optimization pass
Joakim via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Wed Jul 6 11:00:40 PDT 2016
On Monday, 4 July 2016 at 09:21:19 UTC, Joakim wrote:
> On Saturday, 2 July 2016 at 07:42:31 UTC, Johan Engelen wrote:
>> On Saturday, 2 July 2016 at 07:29:47 UTC, Joakim wrote:
>>>
>>> I was surprised that llvm is just silently doing this, with
>>> no warning.
>>
>> This blog article gives some insight:
>> http://blog.llvm.org/2011/05/what-every-c-programmer-should-know_21.html
>
> Thanks for the link, it's very relevant. I've mentioned these
> issues and closed the llvm bug as invalid, as that GVN pass was
> only surfacing this undefined behavior.
>
> Leaving aside the optimizer, the unoptimized phobos debug tests
> should have caught this, shouldn't they? I'll look into why
> those passed next.
Alright, tracked this down, it was a test that had a bad failure
mode. I'll write it up in the General forum.
Johan, you mentioned this other shift bug that you ran into:
https://github.com/dlang/phobos/pull/4509
Was that just one that you had hit recently or did you go
checking all 20+ uses of logical right shift in Phobos to look
for bugs?
More information about the digitalmars-d-ldc
mailing list