Skip to content

Commit 199cf09

Browse files
committed
Also add llrint, whilst I am here
1 parent 324898f commit 199cf09

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3742,6 +3742,7 @@ bool DAGTypeLegalizer::SoftPromoteHalfOperand(SDNode *N, unsigned OpNo) {
37423742
case ISD::FP_TO_SINT:
37433743
case ISD::FP_TO_UINT:
37443744
case ISD::LRINT:
3745+
case ISD::LLRINT:
37453746
Res = SoftPromoteHalfOp_Op0WithStrict(N);
37463747
break;
37473748
case ISD::FP_TO_SINT_SAT:

llvm/test/CodeGen/ARM/llrint-conv.ll

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
22
; RUN: llc < %s -mtriple=armv7-none-eabi -float-abi=soft | FileCheck %s --check-prefixes=CHECK,CHECK-SOFT
33
; RUN: llc < %s -mtriple=armv7-none-eabihf -mattr=+vfp2 -float-abi=hard | FileCheck %s --check-prefixes=CHECK,CHECK-NOFP16
4-
; RUN: llc < %s -mtriple=armv7-none-eabihf -mattr=+vfp2,+fullfp16 -float-abi=hard | FileCheck %s --check-prefixes=CHECK,CHECK-FP16
4+
; RUN: llc < %s -mtriple=armv8-none-eabihf -mattr=+fp-armv8 -float-abi=hard | FileCheck %s --check-prefixes=CHECK,CHECK-FPv8
5+
; RUN: llc < %s -mtriple=armv8-none-eabihf -mattr=+fp-armv8,+fullfp16 -float-abi=hard | FileCheck %s --check-prefixes=CHECK,CHECK-FP16
56

67
define i64 @testmsxh_builtin(half %x) {
78
; CHECK-SOFT-LABEL: testmsxh_builtin:
@@ -22,6 +23,14 @@ define i64 @testmsxh_builtin(half %x) {
2223
; CHECK-NOFP16-NEXT: bl llrintf
2324
; CHECK-NOFP16-NEXT: pop {r11, pc}
2425
;
26+
; CHECK-FPv8-LABEL: testmsxh_builtin:
27+
; CHECK-FPv8: @ %bb.0: @ %entry
28+
; CHECK-FPv8-NEXT: .save {r11, lr}
29+
; CHECK-FPv8-NEXT: push {r11, lr}
30+
; CHECK-FPv8-NEXT: vcvtb.f32.f16 s0, s0
31+
; CHECK-FPv8-NEXT: bl llrintf
32+
; CHECK-FPv8-NEXT: pop {r11, pc}
33+
;
2534
; CHECK-FP16-LABEL: testmsxh_builtin:
2635
; CHECK-FP16: @ %bb.0: @ %entry
2736
; CHECK-FP16-NEXT: .save {r11, lr}

0 commit comments

Comments
 (0)