1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86-64 -mattr=+avx -no-integrated-as 2*9880d681SAndroid Build Coastguard Worker; rdar://7066579 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Worker %0 = type { i64, i64, i64, i64, i64 } ; type %0 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Workerdefine void @test1() nounwind { 7*9880d681SAndroid Build Coastguard Workerentry: 8*9880d681SAndroid Build Coastguard Worker %asmtmp = call %0 asm sideeffect "mov %cr0, $0 \0Amov %cr2, $1 \0Amov %cr3, $2 \0Amov %cr4, $3 \0Amov %cr8, $0 \0A", "=q,=q,=q,=q,=q,~{dirflag},~{fpsr},~{flags}"() nounwind ; <%0> [#uses=0] 9*9880d681SAndroid Build Coastguard Worker ret void 10*9880d681SAndroid Build Coastguard Worker} 11*9880d681SAndroid Build Coastguard Worker 12*9880d681SAndroid Build Coastguard Worker; PR9602 13*9880d681SAndroid Build Coastguard Workerdefine void @test2(float %tmp) nounwind { 14*9880d681SAndroid Build Coastguard Worker call void asm sideeffect "$0", "q"(float %tmp) nounwind 15*9880d681SAndroid Build Coastguard Worker call void asm sideeffect "$0", "Q"(float %tmp) nounwind 16*9880d681SAndroid Build Coastguard Worker ret void 17*9880d681SAndroid Build Coastguard Worker} 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Workerdefine void @test3(double %tmp) nounwind { 20*9880d681SAndroid Build Coastguard Worker call void asm sideeffect "$0", "q"(double %tmp) nounwind 21*9880d681SAndroid Build Coastguard Worker ret void 22*9880d681SAndroid Build Coastguard Worker} 23*9880d681SAndroid Build Coastguard Worker 24*9880d681SAndroid Build Coastguard Worker; rdar://10392864 25*9880d681SAndroid Build Coastguard Workerdefine void @test4(i8 signext %val, i8 signext %a, i8 signext %b, i8 signext %c, i8 signext %d) nounwind { 26*9880d681SAndroid Build Coastguard Workerentry: 27*9880d681SAndroid Build Coastguard Worker %0 = tail call { i8, i8, i8, i8, i8 } asm "foo $1, $2, $3, $4, $1\0Axchgb ${0:b}, ${0:h}", "=q,={ax},={bx},={cx},={dx},0,1,2,3,4,~{dirflag},~{fpsr},~{flags}"(i8 %val, i8 %a, i8 %b, i8 %c, i8 %d) nounwind 28*9880d681SAndroid Build Coastguard Worker ret void 29*9880d681SAndroid Build Coastguard Worker} 30*9880d681SAndroid Build Coastguard Worker 31*9880d681SAndroid Build Coastguard Worker; rdar://10614894 32*9880d681SAndroid Build Coastguard Workerdefine <8 x float> @test5(<8 x float> %a, <8 x float> %b) nounwind { 33*9880d681SAndroid Build Coastguard Workerentry: 34*9880d681SAndroid Build Coastguard Worker %0 = tail call <8 x float> asm "vperm2f128 $3, $2, $1, $0", "=x,x,x,i,~{dirflag},~{fpsr},~{flags}"(<8 x float> %a, <8 x float> %b, i32 16) nounwind 35*9880d681SAndroid Build Coastguard Worker ret <8 x float> %0 36*9880d681SAndroid Build Coastguard Worker} 37*9880d681SAndroid Build Coastguard Worker 38