|
| 1 | +# RUN: llc -o - %s -mtriple=s390x-linux-gnu -mcpu=z15 -start-before=systemz-post-rewrite \ |
| 2 | +# RUN: -stop-after=machine-cp 2>&1 | FileCheck %s |
| 3 | + |
| 4 | +# The chained SELRMux:es both has two operands with the same register but |
| 5 | +# where one of the operands have been marked as undef (resulting from |
| 6 | +# early-ifcvt). Check that the resulting COPY after machine-cp is from $r0l |
| 7 | +# to $r2l. |
| 8 | + |
| 9 | +# CHECK: name: fun0 |
| 10 | +# CHECK: $r2l = COPY $r0l |
| 11 | +--- | |
| 12 | + |
| 13 | + @Res = global i32 0, align 4 |
| 14 | + @Z = global i32 0, align 4 |
| 15 | + define signext i32 @fun0() { ret i32 0 } |
| 16 | +... |
| 17 | +--- |
| 18 | +name: fun0 |
| 19 | +tracksRegLiveness: true |
| 20 | +body: | |
| 21 | + bb.0: |
| 22 | + successors: %bb.1(0x80000000) |
| 23 | + |
| 24 | + renamable $r0l = LRL @Z :: (dereferenceable load (s32) from @Z) |
| 25 | + renamable $r1l = LHIMux 1 |
| 26 | + |
| 27 | + bb.1: |
| 28 | + successors: %bb.1(0x7c000000), %bb.2(0x04000000) |
| 29 | + liveins: $r0l, $r1l |
| 30 | + |
| 31 | + CHIMux renamable $r1l, 0, implicit-def $cc |
| 32 | + renamable $r2l = SELRMux undef renamable $r0l, renamable $r0l, 14, 6, implicit $cc |
| 33 | + renamable $r2l = SELRMux undef renamable $r2l, killed renamable $r2l, 14, 6, implicit $cc |
| 34 | + BRC 14, 8, %bb.1, implicit killed $cc |
| 35 | + J %bb.2 |
| 36 | + |
| 37 | + bb.2: |
| 38 | + liveins: $r2l |
| 39 | + |
| 40 | + STRL renamable $r2l, @Res :: (store (s32) into @Res) |
| 41 | + renamable $r2d = LGFR killed renamable $r2l |
| 42 | + Return implicit $r2d |
| 43 | +... |
0 commit comments