HomePhabricator

[Core] Grab-bag of improvements for Scalar.

Authored by davide on Apr 2 2018, 9:50 AM.

Description

[Core] Grab-bag of improvements for Scalar.

Remove Scalar::Cast.

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.

Patch by Tom Tromey!

Differential Revision: https://reviews.llvm.org/D44907

llvm-svn: 328985

Details

Committed
davideApr 2 2018, 9:50 AM
Differential Revision
D44907: Remove Scalar::Cast
Parents
rGf4e7e5210cd7: Support template template parameters
Branches
Unknown
Tags
Unknown