This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Fix miscompile of comparison with 0xffffffffffffffff
ClosedPublic

Authored by olista01 on Oct 30 2014, 2:36 AM.

Details

Reviewers
t.p.northover
Summary

Some literals in the AArch64 backend had 15 'f's rather than 16, causing comparisons with a constant 0xffffffffffffffff to be miscompiled.

Diff Detail

Event Timeline

olista01 updated this revision to Diff 15561.Oct 30 2014, 2:36 AM
olista01 retitled this revision from to [AArch64] Fix miscompile of comparison with 0xffffffffffffffff.
olista01 updated this object.
olista01 edited the test plan for this revision. (Show Details)
olista01 set the repository for this revision to rL LLVM.
olista01 added a subscriber: Unknown Object (MLST).

Hi Oliver,

Nasty one. I think it might be better to use INT64_MAX instead (explicitly casted, if that's necessary to silence a warning), it makes this kind of mistake impossible.

Cheers.

Tim.

olista01 updated this revision to Diff 15688.Nov 3 2014, 4:22 AM

Using UINT64_MAX etc, instead of literals.

t.p.northover accepted this revision.Nov 3 2014, 7:21 AM
t.p.northover added a reviewer: t.p.northover.

Hi Oliver,

Thanks for making the change. This looks fine to me now.

Tim.

This revision is now accepted and ready to land.Nov 3 2014, 7:21 AM
olista01 closed this revision.Nov 3 2014, 7:39 AM

Thanks, committed as r221157.