This reverts commit 9b92f70d4758f75903ce93feaba5098130820d40. The issue
with the re-applied change was an implicit truncation due to the
multiplication. Although the operations were converted to APInt, the
values were implicitly converted to long due to the typing rules.
Fixes: #59594
I'm not sure that hardcoding 64 here is the right fix. I think what we need to check is that the multiply doesn't overflow.