1 # RUN: llc -mtriple=s390x-linux-gnu -mcpu=z15 -O3 -run-pass=machine-sink %s -o - \
2 # RUN: -verify-machineinstrs | FileCheck %s
4 # Test that the AGHIK can be sunk into %bb.4. It has a def of CC, but it is dead.
7 define void @fun() { ret void }
11 # CHECK: %1:gr64bit = nsw AGHIK %0, -4, implicit-def dead $cc
12 # CHECK-NEXT: CGHI %1, 0, implicit-def $cc
13 # CHECK-NEXT: BRC 14, 6, %bb.1, implicit $cc
20 tracksRegLiveness: true
22 - { id: 0, class: gr64bit }
23 - { id: 1, class: gr64bit }
24 - { id: 2, class: grx32bit }
25 - { id: 3, class: gr64bit }
28 machineFunctionInfo: {}
32 %2:grx32bit = LHIMux 0
33 %3:gr64bit = IMPLICIT_DEF
37 %0:gr64bit = PHI %3, %bb.0, %1, %bb.4
41 %1:gr64bit = nsw AGHIK %0, -4, implicit-def dead $cc
42 CHIMux %2, 0, implicit-def $cc
43 BRC 14, 6, %bb.4, implicit $cc
50 CGHI %1, 0, implicit-def $cc
51 BRC 14, 6, %bb.1, implicit $cc