1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-- | FileCheck %s --check-prefix=i686
3 ; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s --check-prefix=x86_64
5 define i32 @test(i32 %f12) nounwind {
8 ; i686-NEXT: movsbl {{[0-9]+}}(%esp), %eax
13 ; x86_64-NEXT: shrl $16, %edi
14 ; x86_64-NEXT: movsbl %dil, %eax
16 %tmp7.25 = lshr i32 %f12, 16
17 %tmp7.26 = trunc i32 %tmp7.25 to i8
18 %tmp78.2 = sext i8 %tmp7.26 to i32
22 define i32 @test2(i32 %f12) nounwind {
25 ; i686-NEXT: movsbl {{[0-9]+}}(%esp), %eax
28 ; x86_64-LABEL: test2:
30 ; x86_64-NEXT: shrl $16, %edi
31 ; x86_64-NEXT: movsbl %dil, %eax
33 %f11 = shl i32 %f12, 8
34 %tmp7.25 = ashr i32 %f11, 24
38 define i32 @test3(i32 %f12) nounwind {
41 ; i686-NEXT: movl {{[0-9]+}}(%esp), %eax
42 ; i686-NEXT: shrl $11, %eax
43 ; i686-NEXT: movsbl %al, %eax
46 ; x86_64-LABEL: test3:
48 ; x86_64-NEXT: shrl $11, %edi
49 ; x86_64-NEXT: movsbl %dil, %eax
51 %f11 = shl i32 %f12, 13
52 %tmp7.25 = ashr i32 %f11, 24
56 define i64 @test4(i64 %f12) nounwind {
59 ; i686-NEXT: movl {{[0-9]+}}(%esp), %eax
60 ; i686-NEXT: movl %eax, %edx
61 ; i686-NEXT: sarl $31, %edx
64 ; x86_64-LABEL: test4:
66 ; x86_64-NEXT: movslq %edi, %rax
68 %f11 = shl i64 %f12, 32
69 %tmp7.25 = ashr i64 %f11, 32
73 define i16 @test5(i16 %f12) nounwind {
76 ; i686-NEXT: movzwl {{[0-9]+}}(%esp), %eax
77 ; i686-NEXT: shrl $6, %eax
78 ; i686-NEXT: movsbl %al, %eax
79 ; i686-NEXT: # kill: def $ax killed $ax killed $eax
82 ; x86_64-LABEL: test5:
84 ; x86_64-NEXT: shrl $6, %edi
85 ; x86_64-NEXT: movsbl %dil, %eax
86 ; x86_64-NEXT: # kill: def $ax killed $ax killed $eax
88 %f11 = shl i16 %f12, 2
89 %tmp7.25 = ashr i16 %f11, 8
93 define i16 @test6(i16 %f12) nounwind {
96 ; i686-NEXT: movsbl {{[0-9]+}}(%esp), %eax
97 ; i686-NEXT: # kill: def $ax killed $ax killed $eax
100 ; x86_64-LABEL: test6:
102 ; x86_64-NEXT: movsbl %dil, %eax
103 ; x86_64-NEXT: # kill: def $ax killed $ax killed $eax
105 %f11 = shl i16 %f12, 8
106 %tmp7.25 = ashr i16 %f11, 8