1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 ; RUN: llc -mtriple=sparcv9-unknown-linux -verify-machineinstrs -stop-after=finalize-isel < %s | FileCheck %s
4 ; Check that the fp128 load/store is correctly split.
5 ; The pointer metadata for the upper/lower halves of the load/store should be in
6 ; sync with the OP address.
8 define fp128 @testcase(fp128 %0) {
9 ; CHECK-LABEL: name: testcase
12 ; CHECK: [[COPY:%[0-9]+]]:qfpregs = COPY $q0
13 ; CHECK: [[COPY1:%[0-9]+]]:dfpregs = COPY [[COPY]].sub_odd64
14 ; CHECK: [[ADDri:%[0-9]+]]:i64regs = ADDri %stack.0, 0
15 ; CHECK: [[ORri:%[0-9]+]]:i64regs = ORri killed [[ADDri]], 8
16 ; CHECK: STDFrr [[ORri]], $g0, killed [[COPY1]] :: (store (s64) into %stack.0 + 8)
17 ; CHECK: [[COPY2:%[0-9]+]]:dfpregs = COPY [[COPY]].sub_even64
18 ; CHECK: STDFri %stack.0, 0, killed [[COPY2]] :: (store (s64) into %stack.0, align 16)
19 ; CHECK: [[LDXrr:%[0-9]+]]:i64regs = LDXrr [[ORri]], $g0 :: (load (s64) from %stack.0 + 8)
20 ; CHECK: [[LDXri:%[0-9]+]]:i64regs = LDXri %stack.0, 0 :: (load (s64) from %stack.0, align 16)
21 ; CHECK: [[COPY3:%[0-9]+]]:intregs = COPY [[LDXrr]]
22 ; CHECK: [[COPY4:%[0-9]+]]:intregs = COPY [[LDXri]]
23 ; CHECK: [[SRLXri:%[0-9]+]]:i64regs = SRLXri [[LDXrr]], 32
24 ; CHECK: [[COPY5:%[0-9]+]]:intregs = COPY [[SRLXri]]
25 ; CHECK: [[SRLXri1:%[0-9]+]]:i64regs = SRLXri [[LDXri]], 32
26 ; CHECK: [[COPY6:%[0-9]+]]:intregs = COPY [[SRLXri1]]
27 ; CHECK: [[ADDCCri:%[0-9]+]]:intregs = ADDCCri killed [[COPY3]], -1, implicit-def $icc
28 ; CHECK: [[ADDEri:%[0-9]+]]:intregs = ADDEri killed [[COPY5]], -1, implicit-def $icc, implicit $icc
29 ; CHECK: [[ADDEri1:%[0-9]+]]:intregs = ADDEri killed [[COPY4]], -1, implicit-def $icc, implicit $icc
30 ; CHECK: [[ADDEri2:%[0-9]+]]:intregs = ADDEri killed [[COPY6]], -1, implicit-def dead $icc, implicit $icc
31 ; CHECK: [[SRLri:%[0-9]+]]:i64regs = SRLri killed [[ADDCCri]], 0
32 ; CHECK: [[COPY7:%[0-9]+]]:i64regs = COPY [[ADDEri]]
33 ; CHECK: [[SLLXri:%[0-9]+]]:i64regs = SLLXri killed [[COPY7]], 32
34 ; CHECK: [[ORrr:%[0-9]+]]:i64regs = ORrr killed [[SLLXri]], killed [[SRLri]]
35 ; CHECK: [[ADDri1:%[0-9]+]]:i64regs = ADDri %stack.1, 0
36 ; CHECK: [[ORri1:%[0-9]+]]:i64regs = ORri killed [[ADDri1]], 8
37 ; CHECK: STXrr [[ORri1]], $g0, killed [[ORrr]] :: (store (s64) into %stack.1 + 8, basealign 16)
38 ; CHECK: [[SRLri1:%[0-9]+]]:i64regs = SRLri killed [[ADDEri1]], 0
39 ; CHECK: [[COPY8:%[0-9]+]]:i64regs = COPY [[ADDEri2]]
40 ; CHECK: [[SLLXri1:%[0-9]+]]:i64regs = SLLXri killed [[COPY8]], 32
41 ; CHECK: [[ORrr1:%[0-9]+]]:i64regs = ORrr killed [[SLLXri1]], killed [[SRLri1]]
42 ; CHECK: STXri %stack.1, 0, killed [[ORrr1]] :: (store (s64) into %stack.1, align 16)
43 ; CHECK: [[LDDFri:%[0-9]+]]:dfpregs = LDDFri %stack.1, 0 :: (load (s64) from %stack.1, align 16)
44 ; CHECK: [[DEF:%[0-9]+]]:qfpregs = IMPLICIT_DEF
45 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:qfpregs = INSERT_SUBREG [[DEF]], killed [[LDDFri]], %subreg.sub_even64
46 ; CHECK: [[LDDFrr:%[0-9]+]]:dfpregs = LDDFrr [[ORri1]], $g0 :: (load (s64) from %stack.1 + 8)
47 ; CHECK: [[INSERT_SUBREG1:%[0-9]+]]:qfpregs = INSERT_SUBREG [[INSERT_SUBREG]], killed [[LDDFrr]], %subreg.sub_odd64
48 ; CHECK: $q0 = COPY [[INSERT_SUBREG1]]
49 ; CHECK: RETL 8, implicit $q0
51 %1 = bitcast fp128 %0 to i128
53 %3 = bitcast i128 %2 to fp128