Qiu Chaofan b922a36211 [PowerPC] Define SchedModel for Power8
PowerPC subtargets prior to Power9 use the 'legacy' itinerary way to
provide scheduling information. This patch re-writes the tablegen file
to define the scheduling information in the new SchedModel way, which
can bring improvements to some benchmarks.

Reviewed By: shchenz

Differential Revision: https://reviews.llvm.org/D154488
2023-09-08 15:43:21 +08:00

32 lines
932 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=powerpc64le-unknown-unknown \
; RUN: < %s 2>&1 | FileCheck --check-prefix=CHECK-LE %s
; RUN: llc -mtriple=powerpc64-unknown-unknown \
; RUN: < %s 2>&1 | FileCheck %s
define float @bar(ptr %fp) {
; CHECK-LE-LABEL: bar:
; CHECK-LE: # %bb.0: # %entry
; CHECK-LE-NEXT: lwz 3, 0(3)
; CHECK-LE-NEXT: mtfprd 0, 3
; CHECK-LE-NEXT: cmpd 7, 3, 3
; CHECK-LE-NEXT: bne- 7, .+4
; CHECK-LE-NEXT: isync
; CHECK-LE-NEXT: xxsldwi 0, 0, 0, 1
; CHECK-LE-NEXT: xscvspdpn 1, 0
; CHECK-LE-NEXT: blr
;
; CHECK-LABEL: bar:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: lwz 3, 0(3)
; CHECK-NEXT: cmpd 7, 3, 3
; CHECK-NEXT: bne- 7, .+4
; CHECK-NEXT: isync
; CHECK-NEXT: stw 3, -4(1)
; CHECK-NEXT: lfs 1, -4(1)
; CHECK-NEXT: blr
entry:
%0 = load atomic float, ptr %fp acquire, align 4
ret float %0
}