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.
Differential D34737
[InstCombine] Remove 64-bit bit width restriction from m_ConstantInt(uint64_t*&) craig.topper on Jun 27 2017, 11:42 PM. Authored by
Details 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
Event Timeline |