1 # RUN: llc -run-pass x86-fixup-bw-insts -mtriple=x86_64-- -o - %s | FileCheck %s
3 # Verify that we correctly deal with the flag edge cases when replacing
4 # copies by bigger copies, which is a pretty unusual transform.
7 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
9 define i8 @test_movb_killed(i8 %a0) {
13 define i8 @test_movb_impuse(i8 %a0) {
17 define i8 @test_movb_impdef_gr64(i8 %a0) {
21 define i8 @test_movb_impdef_gr32(i8 %a0) {
25 define i8 @test_movb_impdef_gr16(i8 %a0) {
29 define i16 @test_movw_impdef_gr32(i16 %a0) {
33 define i16 @test_movw_impdef_gr64(i16 %a0) {
40 name: test_movb_killed
41 tracksRegLiveness: true
48 ; CHECK: $eax = MOV32rr undef $edi, implicit $dil
49 $al = MOV8rr killed $dil
55 name: test_movb_impuse
56 tracksRegLiveness: true
63 ; CHECK: $eax = MOV32rr undef $edi, implicit $dil
64 $al = MOV8rr $dil, implicit $edi
70 name: test_movb_impdef_gr64
71 tracksRegLiveness: true
78 ; CHECK: $eax = MOV32rr undef $edi, implicit $dil, implicit-def $rax
79 $al = MOV8rr $dil, implicit-def $rax
85 name: test_movb_impdef_gr32
86 tracksRegLiveness: true
93 ; CHECK: $eax = MOV32rr undef $edi, implicit $dil
94 $al = MOV8rr $dil, implicit-def $eax
100 name: test_movb_impdef_gr16
101 tracksRegLiveness: true
108 ; CHECK: $eax = MOV32rr undef $edi, implicit $dil
109 $al = MOV8rr $dil, implicit-def $ax
115 name: test_movw_impdef_gr32
116 tracksRegLiveness: true
123 ; CHECK: $eax = MOV32rr undef $edi, implicit $di
124 $ax = MOV16rr $di, implicit-def $eax
130 name: test_movw_impdef_gr64
131 tracksRegLiveness: true
138 ; CHECK: $eax = MOV32rr undef $edi, implicit $di, implicit-def $rax
139 $ax = MOV16rr $di, implicit-def $rax