HomePhabricator

[Sparc] Custom bitcast between f64 and v2i32

Authored by dcederman on Aug 27 2018, 12:14 AM.

Description

[Sparc] Custom bitcast between f64 and v2i32

Summary:
Currently bitcasting constants from f64 to v2i32 is done by storing the
value to the stack and then loading it again. This is not necessary, but
seems to happen because v2i32 is a valid type for Sparc V8. If it had not
been legal, we would have gotten help from the type legalizer.

This patch tries to do the same work as the legalizer would have done by
bitcasting the floating point constant and splitting the value up into a
vector of two i32 values.

Reviewers: venkatra, jyknight

Reviewed By: jyknight

Subscribers: glaubitz, fedor.sergeev, jrtc27, llvm-commits

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

llvm-svn: 340723

Details

Committed
dcedermanAug 27 2018, 12:14 AM
Reviewer
jyknight
Differential Revision
D49219: [Sparc] Custom bitcast between f64 and v2i32
Parents
rGfe282170487a: [RISCV] atomic_store_nn have a different layout to regular store
Branches
Unknown
Tags
Unknown