mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
6705a324ed
The hardware has created a real mess in the naming for add/sub, which have been renamed basically every generation. Switch the carry out pseudos to have the gfx9/gfx10 names. We were using the original SI/CI v_add_i32/v_sub_i32 names. Later targets reintroduced these names as carryless instructions with a saturating clamp bit, which we do not define. Do this rename so we can unambiguously add these missing instructions. The carry-in versions should also be renamed, but at least those had a consistent _u32 name to begin with. The 16-bit instructions were also renamed, but aren't ambiguous. This does regress assembler error message quality in some cases. In mismatched wave32/wave64 situations, this will switch from "unsupported instruction" to "invalid operand", with the error pointing at the wrong position. I couldn't quite follow how the assembler selects these, but the previous behavior seemed accidental to me. It looked like there was a partial attempt to handle this which was never completed (i.e. there is an AMDGPUOperand::isBoolReg but it isn't used for anything).
32 lines
1.1 KiB
YAML
32 lines
1.1 KiB
YAML
# RUN: llc -march=amdgcn -mcpu=tonga -run-pass post-RA-sched -verify-machineinstrs -o - %s | FileCheck -check-prefix=GCN %s
|
|
|
|
# GCN: FLAT_LOAD_DWORD
|
|
# GCN-NEXT: FLAT_LOAD_DWORD
|
|
# GCN: FLAT_STORE_DWORD
|
|
# GCN-NEXT: FLAT_STORE_DWORD
|
|
|
|
---
|
|
name: cluster_loads_post_ra
|
|
tracksRegLiveness: true
|
|
registers:
|
|
liveins:
|
|
- { reg: '$vgpr0' }
|
|
body: |
|
|
bb.0:
|
|
liveins: $vgpr0
|
|
|
|
$vgpr0_vgpr1 = IMPLICIT_DEF
|
|
$vgpr4_vgpr5 = IMPLICIT_DEF
|
|
$vgpr0 = FLAT_LOAD_DWORD $vgpr0_vgpr1, 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (load 4)
|
|
$vgpr4 = FLAT_LOAD_DWORD $vgpr4_vgpr5, 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (load 4)
|
|
$vgpr2 = IMPLICIT_DEF
|
|
$vgpr3 = IMPLICIT_DEF
|
|
$vgpr6 = IMPLICIT_DEF
|
|
$vgpr0 = V_ADD_CO_U32_e32 16, $vgpr2, implicit-def $vcc, implicit $exec
|
|
$vgpr1 = V_ADDC_U32_e32 $vgpr3, killed $vgpr6, implicit-def dead $vcc, implicit $vcc, implicit $exec
|
|
FLAT_STORE_DWORD $vgpr2_vgpr3, killed $vgpr0, 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4)
|
|
FLAT_STORE_DWORD $vgpr0_vgpr1, killed $vgpr4, 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 4)
|
|
S_ENDPGM 0
|
|
|
|
...
|