forked from OSchip/llvm-project
[NFC][Test] Format the test for IEEE Long double
This commit is contained in:
parent
e0f4dea0d0
commit
60c28a5a2b
|
@ -1,65 +1,197 @@
|
|||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; RUN: llc -verify-machineinstrs -mcpu=a2 < %s | FileCheck %s -check-prefix=FPCVT
|
||||
; RUN: llc -verify-machineinstrs -mcpu=ppc64 < %s | FileCheck %s -check-prefix=PPC64
|
||||
; RUN: llc -verify-machineinstrs -mcpu=pwr9 < %s | FileCheck %s -check-prefix=PWR9
|
||||
target datalayout = "E-m:e-i64:64-n32:64"
|
||||
target triple = "powerpc64-unknown-linux-gnu"
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
define float @fool(float %X) #0 {
|
||||
; FPCVT-LABEL: fool:
|
||||
; FPCVT: # %bb.0: # %entry
|
||||
; FPCVT-NEXT: friz 1, 1
|
||||
; FPCVT-NEXT: blr
|
||||
;
|
||||
; PPC64-LABEL: fool:
|
||||
; PPC64: # %bb.0: # %entry
|
||||
; PPC64-NEXT: fctidz 0, 1
|
||||
; PPC64-NEXT: fcfid 0, 0
|
||||
; PPC64-NEXT: frsp 1, 0
|
||||
; PPC64-NEXT: blr
|
||||
;
|
||||
; PWR9-LABEL: fool:
|
||||
; PWR9: # %bb.0: # %entry
|
||||
; PWR9-NEXT: xsrdpiz 1, 1
|
||||
; PWR9-NEXT: blr
|
||||
entry:
|
||||
%conv = fptosi float %X to i64
|
||||
%conv1 = sitofp i64 %conv to float
|
||||
ret float %conv1
|
||||
|
||||
; FPCVT-LABEL: @fool
|
||||
; FPCVT: friz 1, 1
|
||||
; FPCVT: blr
|
||||
|
||||
; PPC64-LABEL: @fool
|
||||
; PPC64: fctidz [[REG1:[0-9]+]], 1
|
||||
; PPC64: fcfid [[REG2:[0-9]+]], [[REG1]]
|
||||
; PPC64: frsp 1, [[REG2]]
|
||||
; PPC64: blr
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
define double @foodl(double %X) #0 {
|
||||
; FPCVT-LABEL: foodl:
|
||||
; FPCVT: # %bb.0: # %entry
|
||||
; FPCVT-NEXT: friz 1, 1
|
||||
; FPCVT-NEXT: blr
|
||||
;
|
||||
; PPC64-LABEL: foodl:
|
||||
; PPC64: # %bb.0: # %entry
|
||||
; PPC64-NEXT: fctidz 0, 1
|
||||
; PPC64-NEXT: fcfid 1, 0
|
||||
; PPC64-NEXT: blr
|
||||
;
|
||||
; PWR9-LABEL: foodl:
|
||||
; PWR9: # %bb.0: # %entry
|
||||
; PWR9-NEXT: xsrdpiz 1, 1
|
||||
; PWR9-NEXT: blr
|
||||
entry:
|
||||
%conv = fptosi double %X to i64
|
||||
%conv1 = sitofp i64 %conv to double
|
||||
ret double %conv1
|
||||
|
||||
; FPCVT-LABEL: @foodl
|
||||
; FPCVT: friz 1, 1
|
||||
; FPCVT: blr
|
||||
|
||||
; PPC64-LABEL: @foodl
|
||||
; PPC64: fctidz [[REG1:[0-9]+]], 1
|
||||
; PPC64: fcfid 1, [[REG1]]
|
||||
; PPC64: blr
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
define float @fooul(float %X) #0 {
|
||||
; FPCVT-LABEL: fooul:
|
||||
; FPCVT: # %bb.0: # %entry
|
||||
; FPCVT-NEXT: friz 1, 1
|
||||
; FPCVT-NEXT: blr
|
||||
;
|
||||
; PPC64-LABEL: fooul:
|
||||
; PPC64: # %bb.0: # %entry
|
||||
; PPC64-NEXT: addis 3, 2, .LCPI2_0@toc@ha
|
||||
; PPC64-NEXT: li 4, 1
|
||||
; PPC64-NEXT: lfs 0, .LCPI2_0@toc@l(3)
|
||||
; PPC64-NEXT: sldi 4, 4, 63
|
||||
; PPC64-NEXT: fsubs 2, 1, 0
|
||||
; PPC64-NEXT: fcmpu 0, 1, 0
|
||||
; PPC64-NEXT: fctidz 2, 2
|
||||
; PPC64-NEXT: stfd 2, -8(1)
|
||||
; PPC64-NEXT: fctidz 2, 1
|
||||
; PPC64-NEXT: stfd 2, -16(1)
|
||||
; PPC64-NEXT: ld 3, -8(1)
|
||||
; PPC64-NEXT: ld 5, -16(1)
|
||||
; PPC64-NEXT: xor 3, 3, 4
|
||||
; PPC64-NEXT: bc 12, 0, .LBB2_1
|
||||
; PPC64-NEXT: b .LBB2_2
|
||||
; PPC64-NEXT: .LBB2_1: # %entry
|
||||
; PPC64-NEXT: addi 3, 5, 0
|
||||
; PPC64-NEXT: .LBB2_2: # %entry
|
||||
; PPC64-NEXT: sradi 4, 3, 53
|
||||
; PPC64-NEXT: clrldi 5, 3, 63
|
||||
; PPC64-NEXT: addi 4, 4, 1
|
||||
; PPC64-NEXT: cmpldi 4, 1
|
||||
; PPC64-NEXT: rldicl 4, 3, 63, 1
|
||||
; PPC64-NEXT: or 5, 5, 4
|
||||
; PPC64-NEXT: rldicl 6, 5, 11, 53
|
||||
; PPC64-NEXT: addi 6, 6, 1
|
||||
; PPC64-NEXT: clrldi 7, 5, 53
|
||||
; PPC64-NEXT: cmpldi 1, 6, 1
|
||||
; PPC64-NEXT: clrldi 6, 3, 53
|
||||
; PPC64-NEXT: addi 7, 7, 2047
|
||||
; PPC64-NEXT: addi 6, 6, 2047
|
||||
; PPC64-NEXT: or 4, 7, 4
|
||||
; PPC64-NEXT: or 6, 6, 3
|
||||
; PPC64-NEXT: rldicl 4, 4, 53, 11
|
||||
; PPC64-NEXT: rldicr 6, 6, 0, 52
|
||||
; PPC64-NEXT: bc 12, 1, .LBB2_4
|
||||
; PPC64-NEXT: # %bb.3: # %entry
|
||||
; PPC64-NEXT: ori 6, 3, 0
|
||||
; PPC64-NEXT: b .LBB2_4
|
||||
; PPC64-NEXT: .LBB2_4: # %entry
|
||||
; PPC64-NEXT: rldicl 4, 4, 11, 1
|
||||
; PPC64-NEXT: cmpdi 3, 0
|
||||
; PPC64-NEXT: std 6, -32(1)
|
||||
; PPC64-NEXT: bc 12, 5, .LBB2_6
|
||||
; PPC64-NEXT: # %bb.5: # %entry
|
||||
; PPC64-NEXT: ori 4, 5, 0
|
||||
; PPC64-NEXT: b .LBB2_6
|
||||
; PPC64-NEXT: .LBB2_6: # %entry
|
||||
; PPC64-NEXT: std 4, -24(1)
|
||||
; PPC64-NEXT: bc 12, 0, .LBB2_8
|
||||
; PPC64-NEXT: # %bb.7: # %entry
|
||||
; PPC64-NEXT: lfd 0, -32(1)
|
||||
; PPC64-NEXT: fcfid 0, 0
|
||||
; PPC64-NEXT: frsp 1, 0
|
||||
; PPC64-NEXT: blr
|
||||
; PPC64-NEXT: .LBB2_8:
|
||||
; PPC64-NEXT: lfd 0, -24(1)
|
||||
; PPC64-NEXT: fcfid 0, 0
|
||||
; PPC64-NEXT: frsp 0, 0
|
||||
; PPC64-NEXT: fadds 1, 0, 0
|
||||
; PPC64-NEXT: blr
|
||||
;
|
||||
; PWR9-LABEL: fooul:
|
||||
; PWR9: # %bb.0: # %entry
|
||||
; PWR9-NEXT: xsrdpiz 1, 1
|
||||
; PWR9-NEXT: blr
|
||||
entry:
|
||||
%conv = fptoui float %X to i64
|
||||
%conv1 = uitofp i64 %conv to float
|
||||
ret float %conv1
|
||||
|
||||
; FPCVT-LABEL: @fooul
|
||||
; FPCVT: friz 1, 1
|
||||
; FPCVT: blr
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
define double @fooudl(double %X) #0 {
|
||||
; FPCVT-LABEL: fooudl:
|
||||
; FPCVT: # %bb.0: # %entry
|
||||
; FPCVT-NEXT: friz 1, 1
|
||||
; FPCVT-NEXT: blr
|
||||
;
|
||||
; PPC64-LABEL: fooudl:
|
||||
; PPC64: # %bb.0: # %entry
|
||||
; PPC64-NEXT: addis 3, 2, .LCPI3_0@toc@ha
|
||||
; PPC64-NEXT: li 4, 1
|
||||
; PPC64-NEXT: lfs 0, .LCPI3_0@toc@l(3)
|
||||
; PPC64-NEXT: sldi 4, 4, 63
|
||||
; PPC64-NEXT: fsub 2, 1, 0
|
||||
; PPC64-NEXT: fcmpu 0, 1, 0
|
||||
; PPC64-NEXT: fctidz 2, 2
|
||||
; PPC64-NEXT: stfd 2, -8(1)
|
||||
; PPC64-NEXT: fctidz 2, 1
|
||||
; PPC64-NEXT: stfd 2, -16(1)
|
||||
; PPC64-NEXT: ld 3, -8(1)
|
||||
; PPC64-NEXT: ld 5, -16(1)
|
||||
; PPC64-NEXT: xor 3, 3, 4
|
||||
; PPC64-NEXT: li 4, 1107
|
||||
; PPC64-NEXT: sldi 4, 4, 52
|
||||
; PPC64-NEXT: bc 12, 0, .LBB3_1
|
||||
; PPC64-NEXT: b .LBB3_2
|
||||
; PPC64-NEXT: .LBB3_1: # %entry
|
||||
; PPC64-NEXT: addi 3, 5, 0
|
||||
; PPC64-NEXT: .LBB3_2: # %entry
|
||||
; PPC64-NEXT: rldicl 5, 3, 32, 32
|
||||
; PPC64-NEXT: clrldi 3, 3, 32
|
||||
; PPC64-NEXT: or 4, 5, 4
|
||||
; PPC64-NEXT: addis 5, 2, .LCPI3_1@toc@ha
|
||||
; PPC64-NEXT: std 4, -24(1)
|
||||
; PPC64-NEXT: li 4, 1075
|
||||
; PPC64-NEXT: sldi 4, 4, 52
|
||||
; PPC64-NEXT: or 3, 3, 4
|
||||
; PPC64-NEXT: lfd 0, .LCPI3_1@toc@l(5)
|
||||
; PPC64-NEXT: std 3, -32(1)
|
||||
; PPC64-NEXT: lfd 1, -24(1)
|
||||
; PPC64-NEXT: lfd 2, -32(1)
|
||||
; PPC64-NEXT: fsub 0, 1, 0
|
||||
; PPC64-NEXT: fadd 1, 2, 0
|
||||
; PPC64-NEXT: blr
|
||||
;
|
||||
; PWR9-LABEL: fooudl:
|
||||
; PWR9: # %bb.0: # %entry
|
||||
; PWR9-NEXT: xsrdpiz 1, 1
|
||||
; PWR9-NEXT: blr
|
||||
entry:
|
||||
%conv = fptoui double %X to i64
|
||||
%conv1 = uitofp i64 %conv to double
|
||||
ret double %conv1
|
||||
|
||||
; FPCVT-LABEL: @fooudl
|
||||
; FPCVT: friz 1, 1
|
||||
; FPCVT: blr
|
||||
}
|
||||
|
||||
attributes #0 = { nounwind readnone "no-signed-zeros-fp-math"="true" }
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue