1*9880d681SAndroid Build Coastguard Worker# RUN: llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o - %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker# This test ensures that the MIR parser parses the 'undef' register flags 3*9880d681SAndroid Build Coastguard Worker# correctly. 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Worker--- | 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Worker define i32 @compute(i32 %a) #0 { 8*9880d681SAndroid Build Coastguard Worker body: 9*9880d681SAndroid Build Coastguard Worker %c = mul i32 %a, 11 10*9880d681SAndroid Build Coastguard Worker ret i32 %c 11*9880d681SAndroid Build Coastguard Worker } 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Worker define i32 @foo(i32 %a) #0 { 14*9880d681SAndroid Build Coastguard Worker entry: 15*9880d681SAndroid Build Coastguard Worker %b = call i32 @compute(i32 %a) 16*9880d681SAndroid Build Coastguard Worker ret i32 %b 17*9880d681SAndroid Build Coastguard Worker } 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Worker attributes #0 = { "no-frame-pointer-elim"="false" } 20*9880d681SAndroid Build Coastguard Worker 21*9880d681SAndroid Build Coastguard Worker... 22*9880d681SAndroid Build Coastguard Worker--- 23*9880d681SAndroid Build Coastguard Workername: compute 24*9880d681SAndroid Build Coastguard Workerbody: | 25*9880d681SAndroid Build Coastguard Worker bb.0.body: 26*9880d681SAndroid Build Coastguard Worker %eax = IMUL32rri8 %edi, 11, implicit-def %eflags 27*9880d681SAndroid Build Coastguard Worker RETQ %eax 28*9880d681SAndroid Build Coastguard Worker... 29*9880d681SAndroid Build Coastguard Worker--- 30*9880d681SAndroid Build Coastguard Workername: foo 31*9880d681SAndroid Build Coastguard Workerbody: | 32*9880d681SAndroid Build Coastguard Worker bb.0.entry: 33*9880d681SAndroid Build Coastguard Worker ; CHECK: PUSH64r undef %rax 34*9880d681SAndroid Build Coastguard Worker PUSH64r undef %rax, implicit-def %rsp, implicit %rsp 35*9880d681SAndroid Build Coastguard Worker CALL64pcrel32 @compute, csr_64, implicit %rsp, implicit %edi, implicit-def %rsp, implicit-def %eax 36*9880d681SAndroid Build Coastguard Worker %rdx = POP64r implicit-def %rsp, implicit %rsp 37*9880d681SAndroid Build Coastguard Worker RETQ %eax 38*9880d681SAndroid Build Coastguard Worker... 39