aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/AMDGPU/cmp_shrink.mir
blob: 9ff904cc31de820afa73dd73262964e2274d1737 (plain)
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
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=amdgcn -mcpu=gfx900 -run-pass si-shrink-instructions -verify-machineinstrs %s -o - | FileCheck -check-prefix=GCN %s
# RUN: llc -mtriple=amdgcn -mcpu=gfx900 -passes si-shrink-instructions -verify-machineinstrs %s -o - | FileCheck -check-prefix=GCN %s

---
name:             not_shrink_icmp
body:             |
  bb.0:
    ; GCN-LABEL: name: not_shrink_icmp
    ; GCN: S_CMP_LT_I32 65, 1, implicit-def $scc
    S_CMP_GT_I32 1, 65, implicit-def $scc
...

---
name:             shrink_icmp
body:             |
  bb.0:
    ; GCN-LABEL: name: shrink_icmp
    ; GCN: %op0:sgpr_32 = COPY $sgpr0
    ; GCN-NEXT: %cond:sreg_64 = V_CMPX_GE_U32_e64 5, %op0, implicit-def $exec, implicit $exec
    ; GCN-NEXT: S_NOP 0
    %op0:sgpr_32 = COPY $sgpr0
    %cond:sreg_64 = V_CMPX_LE_U32_e64 %op0, 5, implicit-def $exec, implicit $exec
    S_NOP 0
...