This is an archive of the discontinued LLVM Phabricator instance.

Fix for PR26356
AbandonedPublic

Authored by nemanjai on Jan 28 2016, 10:30 AM.

Details

Summary

Fast Isel fails when trying to load an unsigned immediate greater than 0x7FFF. The li instruction takes a signed immediate so it isn't appropriate for such values.

Diff Detail

Repository
rL LLVM

Event Timeline

nemanjai updated this revision to Diff 46294.Jan 28 2016, 10:30 AM
nemanjai retitled this revision from to Fix for PR26356.
nemanjai updated this object.
nemanjai added reviewers: kbarton, hfinkel.
nemanjai set the repository for this revision to rL LLVM.
nemanjai added a subscriber: llvm-commits.
echristo edited edge metadata.Jan 28 2016, 7:39 PM

I think all we actually need to check is whether or not the sign extended value is in UInt16 rather than the zero extended value.

I've gone ahead and done this and I'll commit it in a few.

nemanjai abandoned this revision.Jan 29 2016, 5:53 AM

Thanks Eric. I'll abandon the revision.
I only implemented it this way because for some reason, I didn't want to fall through and get the load immediate shifted. But that really doesn't matter in this context.