[SystemZ] Implement ISD::BITCAST for fp128 -> i128.
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Thu, 23 Sep 2021 16:13:58 +0000 (18:13 +0200)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Fri, 24 Sep 2021 08:26:45 +0000 (10:26 +0200)
commitea92283449f9b132531ef152625e3e799395e449
treeee4e35264afed2d1225791bea7113144b9cebe38
parent2b23db78a33c2a6852ca098ebfe9b5636ef7d980
[SystemZ] Implement ISD::BITCAST for fp128 -> i128.

The type legalizer has by default no method of doing this bitcast other than
storing and reloading the value from stack.

This patch implements a custom lowering of this operation using extractions
of subregs (z13 and earlier using FP128 register pairs), or of vector
elements (with 'vector enhancements 1' using VR128 FP registers).

Review: Ulrich Weigand

Differential Revision: https://reviews.llvm.org/D110346
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
llvm/test/CodeGen/SystemZ/fp-conv-19.ll [new file with mode: 0644]