This is an archive of the discontinued LLVM Phabricator instance.

Remove Scalar::Cast
ClosedPublic

Authored by tromey on Mar 26 2018, 1:09 PM.

Details

Summary

It was noted on the list that this method is unused. So, this patch
removes it.

Fix Scalar::Promote for most integer types

This fixes promotion of most integer types (128- and 256-bit types are
handled in a subsequent patch) to floating-point types. Previously
promotion was done bitwise, where value preservation is correct.

Fix Scalar::Promote for 128- and 256-bit integer types

This patch fixes the behavior of Scalar::Promote when trying to
perform a binary operation involving a 128- or 256-bit integer type
and a floating-point type. Now, the integer is cast to the floating
point type for the operation.

Event Timeline

tromey created this revision.Mar 26 2018, 1:09 PM
clayborg accepted this revision.Mar 29 2018, 9:19 AM

Very nice. Thanks for doing this. Someone a while back had converted Scalar to use APInt and APFloat and never got around to all of these details.

This revision is now accepted and ready to land.Mar 29 2018, 9:19 AM
davide added a subscriber: davide.Mar 29 2018, 9:24 AM

@tromey thanks! do you need somebody to commit this for you?

@tromey thanks! do you need somebody to commit this for you?

Yes. I do not have commit access.

OK, I'll commit it for you later today.

This revision was automatically updated to reflect the committed changes.