This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Remove 64-bit bit width restriction from m_ConstantInt(uint64_t*&)
ClosedPublic

Authored by craig.topper on Jun 27 2017, 11:42 PM.

Details

Summary

I think we only need to make sure the value fits in 64-bits not that bit width is 64-bit.

This helps places that use this for shift amounts since the shift amount needs to be the same bitwidth as the LHS, but can't be larger than the bit width.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Jun 27 2017, 11:42 PM
spatel accepted this revision.Jun 28 2017, 9:36 AM

LGTM.

test/Transforms/InstCombine/icmp.ll
765 ↗(On Diff #104349)

Update comment.

This revision is now accepted and ready to land.Jun 28 2017, 9:36 AM
This revision was automatically updated to reflect the committed changes.