1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 3
2 # RUN: llc -march=amdgcn -run-pass=amdgpu-postlegalizer-combiner -verify-machineinstrs -o - %s | FileCheck %s
5 name: test_reassoc_infinite_loop
7 tracksRegLiveness: true
10 liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3, $vgpr4
12 ; CHECK-LABEL: name: test_reassoc_infinite_loop
13 ; CHECK: liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3, $vgpr4
15 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
16 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
17 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[COPY]], [[C]]
18 ; CHECK-NEXT: $vgpr0 = COPY [[ADD]](s32)
19 ; CHECK-NEXT: SI_RETURN implicit $vgpr0
20 %0:_(s32) = COPY $vgpr0
21 %1:_(s32) = G_CONSTANT i32 0
22 %2:_(s32) = G_CONSTANT i32 1
23 %3:_(s1) = G_ICMP intpred(eq), %1(s32), %1
24 %4:_(s32) = G_SELECT %3(s1), %2, %1
25 %5:_(s32) = COPY %4(s32)
26 %6:_(s32) = G_ADD %0, %5
27 %7:_(s32) = G_ADD %6, %2
29 SI_RETURN implicit $vgpr0