mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
59de807f62
This is the groundwork required to implement strictfp. For now, this should be NFC for regular instructoins (many instructions just gain an extra use of a reserved register). Regalloc won't rematerialize instructions with reads of physical registers, but we were suffering from that anyway with the exec reads. Should add it for all the related FP uses (possibly with some extras). I did not add it to either the gpr index mode instructions (or every single VALU instruction) since it's a ridiculous feature already modeled as an arbitrary side effect. Also work towards marking instructions with FP exceptions. This doesn't actually set the bit yet since this would start to change codegen. It seems nofpexcept is currently not implied from the regular IR FP operations. Add it to some MIR tests where I think it might matter.
32 lines
1.2 KiB
YAML
32 lines
1.2 KiB
YAML
# RUN: llc -march=amdgcn -verify-machineinstrs -run-pass post-RA-sched %s -o - | FileCheck %s
|
|
|
|
# This tests a situation where a sub-register of a killed super-register operand
|
|
# of V_MOVRELS happens to have an undef use later on. This leads to the post RA
|
|
# scheduler adding additional implicit operands to the V_MOVRELS, which used
|
|
# to fail machine instruction verification.
|
|
|
|
--- |
|
|
|
|
define amdgpu_vs void @main(i32 %arg) { ret void }
|
|
|
|
...
|
|
---
|
|
# CHECK-LABEL: name: main
|
|
# CHECK-LABEL: bb.0:
|
|
# CHECK: V_MOVRELS_B32_e32
|
|
# CHECK: V_MAC_F32_e32
|
|
|
|
name: main
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0:
|
|
$m0 = S_MOV_B32 undef $sgpr0
|
|
V_MOVRELD_B32_e32 undef $vgpr2, 0, implicit $m0, implicit $exec, implicit-def $vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8, implicit undef $vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8(tied-def 4)
|
|
$m0 = S_MOV_B32 undef $sgpr0
|
|
$vgpr1 = V_MOVRELS_B32_e32 undef $vgpr1, implicit $m0, implicit $exec, implicit killed $vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8
|
|
$vgpr4 = nofpexcept V_MAC_F32_e32 undef $vgpr0, undef $vgpr0, undef $vgpr4, implicit $mode, implicit $exec
|
|
EXP_DONE 15, undef $vgpr0, killed $vgpr1, killed $vgpr4, undef $vgpr0, 0, 0, 12, implicit $exec
|
|
S_ENDPGM 0
|
|
|
|
...
|