This is an archive of the discontinued LLVM Phabricator instance.

Fix big shift constant folding
ClosedPublic

Authored by chfast on Feb 17 2015, 12:14 PM.

Details

Summary

Constant folding for shift IR instructions ignores all bits above 32 of second argument (shift amount). Because of that, some undef results are not recognized and APInt can raise an assert failure if second argument has more than 64 bits.

Diff Detail

Repository
rL LLVM

Event Timeline

chfast updated this revision to Diff 20101.Feb 17 2015, 12:14 PM
chfast retitled this revision from to Fix big shift constant folding.
chfast updated this object.
chfast edited the test plan for this revision. (Show Details)
chfast set the repository for this revision to rL LLVM.
chfast added a subscriber: Unknown Object (MLST).

How can I find reviewers for the change?

Is there anyone willing to review this?

chfast updated this revision to Diff 21531.Mar 9 2015, 4:58 PM
chfast updated this revision to Diff 21556.Mar 10 2015, 1:43 AM

Better fix (as suggested by nicholas) and test file

majnemer accepted this revision.Mar 10 2015, 1:42 PM
majnemer added a reviewer: majnemer.
This revision is now accepted and ready to land.Mar 10 2015, 1:42 PM

My first LGTM, thanks. What should I do with the patch now? Phabricator requires action from me.

chfast closed this revision.Mar 11 2015, 4:54 PM

Can someone apply this patch to the trunk?

I accidentally closed the review playing with arc.