-
Notifications
You must be signed in to change notification settings - Fork 14.3k
SystemZ: Stop casting fp typed atomic loads in the IR #90768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ed79692
43bcb0f
200ce90
c9fb212
c84cad4
1a83285
39dd212
e316e1b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,27 @@ | ||
; Test long double atomic loads. These are emitted by the Clang FE as i128 | ||
; loads with a bitcast, and this test case gets converted into that form as | ||
; well by the AtomicExpand pass. | ||
; Test long double atomic loads. | ||
; | ||
; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck -check-prefixes=CHECK,BASE %s | ||
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck -check-prefixes=CHECK,Z13 %s | ||
|
||
; TODO: Is it worth testing softfp with vector? | ||
; RUN: llc < %s -mtriple=s390x-linux-gnu -mattr=+soft-float | FileCheck -check-prefixes=SOFTFP %s | ||
|
||
; FIXME: Without vector support, v2i64 should be legal and we should | ||
; introduce a simple bitcast, which could fold into the store use | ||
; avoid the intermediate f registers. | ||
define void @f1(ptr %ret, ptr %src) { | ||
; CHECK-LABEL: f1: | ||
; CHECK: # %bb.0: | ||
; CHECK-NEXT: lpq %r0, 0(%r3) | ||
; CHECK-NEXT: stg %r1, 8(%r2) | ||
; CHECK-NEXT: stg %r0, 0(%r2) | ||
; CHECK-NEXT: br %r14 | ||
; Z13-NEXT: lpq %r0, 0(%r3) | ||
; Z13-NEXT: stg %r1, 8(%r2) | ||
; Z13-NEXT: stg %r0, 0(%r2) | ||
; Z13-NEXT: br %r14 | ||
|
||
; BASE: lpq %r0, 0(%r3) | ||
; BASE-NEXT: ldgr %f0, %r0 | ||
; BASE-NEXT: ldgr %f2, %r1 | ||
; BASE-NEXT: std %f0, 0(%r2) | ||
; BASE-NEXT: std %f2, 8(%r2) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would be nice to short-circuit the LDGR/STD to just an STG here. We actually do this already for spills in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This also should go away with the legal v2i64 fix I posted |
||
; BASE-NEXT: br %r14 | ||
|
||
; SOFTFP-LABEL: f1: | ||
; SOFTFP: # %bb.0: | ||
|
@@ -30,23 +37,17 @@ define void @f1(ptr %ret, ptr %src) { | |
define void @f1_fpuse(ptr %ret, ptr %src) { | ||
; CHECK-LABEL: f1_fpuse: | ||
; CHECK: # %bb.0: | ||
; BASE-NEXT: aghi %r15, -176 | ||
; BASE-NEXT: .cfi_def_cfa_offset 336 | ||
|
||
; CHECK-NEXT: lpq %r0, 0(%r3) | ||
|
||
; BASE-NEXT: stg %r1, 168(%r15) | ||
; BASE-NEXT: stg %r0, 160(%r15) | ||
; BASE-NEXT: ld %f0, 160(%r15) | ||
; BASE-NEXT: ld %f2, 168(%r15) | ||
; BASE-NEXT: ldgr %f0, %r0 | ||
; BASE-NEXT: ldgr %f2, %r1 | ||
|
||
; Z13-NEXT: vlvgp %v0, %r0, %r1 | ||
; Z13-NEXT: vrepg %v2, %v0, 1 | ||
|
||
; CHECK-NEXT: axbr %f0, %f0 | ||
; CHECK-NEXT: std %f0, 0(%r2) | ||
; CHECK-NEXT: std %f2, 8(%r2) | ||
; BASE-NEXT: aghi %r15, 176 | ||
; CHECK-NEXT: br %r14 | ||
|
||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.