File: stale-livevar-in-twoaddr-pass.mir

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,998,492 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (37 lines) | stat: -rw-r--r-- 1,417 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# RUN: llc -mtriple=amdgcn -mcpu=gfx900 -run-pass=livevars,phi-node-elimination,twoaddressinstruction -verify-machineinstrs -o - %s | FileCheck %s
# RUN: llc -mtriple=amdgcn -mcpu=gfx900 --passes='require<live-vars>,phi-node-elimination,two-address-instruction' -verify-machineinstrs -o - %s | FileCheck %s
# This used to fail under ASAN enabled build because we didn't update LiveVariables in SIInstrInfo::convertToThreeAddress()
# CHECK: _amdgpu_ps_main

---
name:            _amdgpu_ps_main
alignment:       1
tracksRegLiveness: true
body:             |
  bb.0:
    liveins: $sgpr2, $vgpr2, $vgpr3

    %0:vgpr_32 = COPY $vgpr3
    %1:vgpr_32 = COPY $vgpr2
    S_BRANCH %bb.3

  bb.1:
    %2:vgpr_32 = V_MAC_F32_e32 0, %0, %1, implicit $mode, implicit $exec
    %3:vgpr_32 = V_MED3_F32_e64 0, %1, 0, %2, 0, %2, 0, 0, implicit $mode, implicit $exec

  bb.2:
    %4:vgpr_32 = PHI %5, %bb.3, %3, %bb.1
    SI_END_CF %6, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
    EXP_DONE 0, %4, %4, %4, %4, -1, 0, 15, implicit $exec
    S_ENDPGM 0

  bb.3:
    successors: %bb.1, %bb.2

    %5:vgpr_32 = V_MAC_F32_e32 0, %1, %0, implicit $mode, implicit $exec
    %7:vgpr_32 = V_CVT_I32_F32_e32 %5, implicit $mode, implicit $exec
    %8:sreg_64 = V_CMP_NE_U32_e64 1, %7, implicit $exec
    %6:sreg_64 = SI_IF %8, %bb.2, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
    S_BRANCH %bb.1

...