blob: 1a2625116a6e554d5cec71e36b82baa4af411a85 [file]
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -o - %s -verify-each -mtriple=s390x-linux-gnu -mcpu=z196 --passes='require<live-intervals>,two-address-instruction' | FileCheck %s
# Check that LiveIntervals are not shrunk past the subsequent untied use of
# [[COPY3]] in the INLINEASM instruction.
---
name: f2
body: |
bb.0:
liveins: $r2l
; CHECK-LABEL: name: f2
; CHECK: liveins: $r2l
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:gr32bit = COPY $r2l
; CHECK-NEXT: [[COPY1:%[0-9]+]]:grh32bit = COPY [[COPY]]
; CHECK-NEXT: $r2l = COPY [[COPY]]
; CHECK-NEXT: $r3l = COPY [[COPY]]
; CHECK-NEXT: [[COPY2:%[0-9]+]]:grh32bit = COPY [[COPY1]]
; CHECK-NEXT: INLINEASM &"stepa $1, $2, $3", attdialect, regdef:GRH32Bit, def [[COPY2]], reguse tiedto:$0, [[COPY2]](tied-def 3), reguse, $r2l, reguse, killed $r3l
; CHECK-NEXT: [[COPY3:%[0-9]+]]:grh32bit = COPY [[COPY2]]
; CHECK-NEXT: [[COPY4:%[0-9]+]]:grh32bit = COPY [[COPY3]]
; CHECK-NEXT: INLINEASM &"stepb $1, $2", attdialect, regdef-ec:GRH32Bit, def early-clobber [[COPY4]], reguse tiedto:$0, [[COPY4]](tied-def 3), reguse:GRH32Bit, [[COPY3]]
; CHECK-NEXT: $r2l = COPY [[COPY4]]
; CHECK-NEXT: Return implicit $r2l
%0:gr32bit = COPY killed $r2l
%2:grh32bit = COPY %0
$r2l = COPY %0
$r3l = COPY %0
INLINEASM &"stepa $1, $2, $3", attdialect, regdef:GRH32Bit, def %1:grh32bit, reguse tiedto:$0, %2(tied-def 3), reguse, killed $r2l, reguse, killed $r3l
%4:grh32bit = COPY %1
INLINEASM &"stepb $1, $2", attdialect, regdef-ec:GRH32Bit, def early-clobber %3:grh32bit, reguse tiedto:$0, %4(tied-def 3), reguse:GRH32Bit, %4
$r2l = COPY %3
Return implicit killed $r2l
...