[PATCH] D82443: [ARM] Narrowing half-precision lowering to supported CCs
Puyan Lotfi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 2 10:47:50 PDT 2020
plotfi updated this revision to Diff 275163.
plotfi added a comment.
Simplifying diff into a oneliner.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82443/new/
https://reviews.llvm.org/D82443
Files:
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/test/CodeGen/ARM/arm-half-promote.ll
Index: llvm/test/CodeGen/ARM/arm-half-promote.ll
===================================================================
--- /dev/null
+++ llvm/test/CodeGen/ARM/arm-half-promote.ll
@@ -0,0 +1,8 @@
+; RUN: llc -mtriple=thumbv7s-apple-ios7.0.0 %s -o -
+
+target datalayout = "e-m:o-p:32:32-Fi8-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
+target triple = "thumbv7s-apple-ios7.0.0"
+
+define fastcc { <8 x half>, <8 x half> } @f1() {
+ ret { <8 x half>, <8 x half> } zeroinitializer
+}
Index: llvm/lib/Target/ARM/ARMISelLowering.cpp
===================================================================
--- llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -4148,7 +4148,7 @@
bool ARMTargetLowering::splitValueIntoRegisterParts(
SelectionDAG &DAG, const SDLoc &DL, SDValue Val, SDValue *Parts,
unsigned NumParts, MVT PartVT, Optional<CallingConv::ID> CC) const {
- bool IsABIRegCopy = CC.hasValue();
+ bool IsABIRegCopy = CC.hasValue() && (CC.getValue() != CallingConv::Fast);
EVT ValueVT = Val.getValueType();
if (IsABIRegCopy && (ValueVT == MVT::f16 || ValueVT == MVT::bf16) &&
PartVT == MVT::f32) {
@@ -4166,7 +4166,7 @@
SDValue ARMTargetLowering::joinRegisterPartsIntoValue(
SelectionDAG &DAG, const SDLoc &DL, const SDValue *Parts, unsigned NumParts,
MVT PartVT, EVT ValueVT, Optional<CallingConv::ID> CC) const {
- bool IsABIRegCopy = CC.hasValue();
+ bool IsABIRegCopy = CC.hasValue() && (CC.getValue() != CallingConv::Fast);
if (IsABIRegCopy && (ValueVT == MVT::f16 || ValueVT == MVT::bf16) &&
PartVT == MVT::f32) {
unsigned ValueBits = ValueVT.getSizeInBits();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82443.275163.patch
Type: text/x-patch
Size: 1657 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200702/ff41d27f/attachment.bin>
More information about the llvm-commits
mailing list