Skip to content

Commit 6606936

Browse files
committed
[RISCV] Remove -target-abi from half-bitmanip-dagcombines.ll.
This should be testing the custom ISD nodes we use for passing half values in GPRs. We should optimize these to integer operations, but we currently don't.
1 parent 88bc29f commit 6606936

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

llvm/test/CodeGen/RISCV/half-bitmanip-dagcombines.ll

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \
33
; RUN: | FileCheck -check-prefix=RV32I %s
44
; RUN: llc -mtriple=riscv32 -mattr=+experimental-zfh -verify-machineinstrs \
5-
; RUN: -target-abi ilp32f < %s \
6-
; RUN: | FileCheck -check-prefix=RV32IZFH %s
5+
; RUN: < %s | FileCheck -check-prefix=RV32IZFH %s
76
; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \
87
; RUN: | FileCheck -check-prefix=RV64I %s
98
; RUN: llc -mtriple=riscv64 -mattr=+experimental-zfh -verify-machineinstrs \
10-
; RUN: -target-abi lp64f < %s \
11-
; RUN: | FileCheck -check-prefix=RV64IZFH %s
9+
; RUN: < %s | FileCheck -check-prefix=RV64IZFH %s
1210

1311
; This file tests cases where simple floating point operations can be
1412
; profitably handled though bit manipulation if a soft-float ABI is being used
@@ -25,7 +23,9 @@ define half @fneg(half %a) nounwind {
2523
;
2624
; RV32IZFH-LABEL: fneg:
2725
; RV32IZFH: # %bb.0:
28-
; RV32IZFH-NEXT: fneg.h fa0, fa0
26+
; RV32IZFH-NEXT: fmv.h.x ft0, a0
27+
; RV32IZFH-NEXT: fneg.h ft0, ft0
28+
; RV32IZFH-NEXT: fmv.x.h a0, ft0
2929
; RV32IZFH-NEXT: ret
3030
;
3131
; RV64I-LABEL: fneg:
@@ -36,7 +36,9 @@ define half @fneg(half %a) nounwind {
3636
;
3737
; RV64IZFH-LABEL: fneg:
3838
; RV64IZFH: # %bb.0:
39-
; RV64IZFH-NEXT: fneg.h fa0, fa0
39+
; RV64IZFH-NEXT: fmv.h.x ft0, a0
40+
; RV64IZFH-NEXT: fneg.h ft0, ft0
41+
; RV64IZFH-NEXT: fmv.x.h a0, ft0
4042
; RV64IZFH-NEXT: ret
4143
%1 = fneg half %a
4244
ret half %1
@@ -54,7 +56,9 @@ define half @fabs(half %a) nounwind {
5456
;
5557
; RV32IZFH-LABEL: fabs:
5658
; RV32IZFH: # %bb.0:
57-
; RV32IZFH-NEXT: fabs.h fa0, fa0
59+
; RV32IZFH-NEXT: fmv.h.x ft0, a0
60+
; RV32IZFH-NEXT: fabs.h ft0, ft0
61+
; RV32IZFH-NEXT: fmv.x.h a0, ft0
5862
; RV32IZFH-NEXT: ret
5963
;
6064
; RV64I-LABEL: fabs:
@@ -66,7 +70,9 @@ define half @fabs(half %a) nounwind {
6670
;
6771
; RV64IZFH-LABEL: fabs:
6872
; RV64IZFH: # %bb.0:
69-
; RV64IZFH-NEXT: fabs.h fa0, fa0
73+
; RV64IZFH-NEXT: fmv.h.x ft0, a0
74+
; RV64IZFH-NEXT: fabs.h ft0, ft0
75+
; RV64IZFH-NEXT: fmv.x.h a0, ft0
7076
; RV64IZFH-NEXT: ret
7177
%1 = call half @llvm.fabs.f16(half %a)
7278
ret half %1
@@ -92,7 +98,10 @@ define half @fcopysign_fneg(half %a, half %b) nounwind {
9298
;
9399
; RV32IZFH-LABEL: fcopysign_fneg:
94100
; RV32IZFH: # %bb.0:
95-
; RV32IZFH-NEXT: fsgnjn.h fa0, fa0, fa1
101+
; RV32IZFH-NEXT: fmv.h.x ft0, a1
102+
; RV32IZFH-NEXT: fmv.h.x ft1, a0
103+
; RV32IZFH-NEXT: fsgnjn.h ft0, ft1, ft0
104+
; RV32IZFH-NEXT: fmv.x.h a0, ft0
96105
; RV32IZFH-NEXT: ret
97106
;
98107
; RV64I-LABEL: fcopysign_fneg:
@@ -108,7 +117,10 @@ define half @fcopysign_fneg(half %a, half %b) nounwind {
108117
;
109118
; RV64IZFH-LABEL: fcopysign_fneg:
110119
; RV64IZFH: # %bb.0:
111-
; RV64IZFH-NEXT: fsgnjn.h fa0, fa0, fa1
120+
; RV64IZFH-NEXT: fmv.h.x ft0, a1
121+
; RV64IZFH-NEXT: fmv.h.x ft1, a0
122+
; RV64IZFH-NEXT: fsgnjn.h ft0, ft1, ft0
123+
; RV64IZFH-NEXT: fmv.x.h a0, ft0
112124
; RV64IZFH-NEXT: ret
113125
%1 = fneg half %b
114126
%2 = call half @llvm.copysign.f16(half %a, half %1)

0 commit comments

Comments
 (0)