1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown-linux-gnu | FileCheck %s --check-prefix=X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s --check-prefix=X64
5 define signext i16 @foo(i16 signext %x) nounwind {
7 ; X86: # %bb.0: # %entry
8 ; X86-NEXT: movl $21998, %eax # imm = 0x55EE
9 ; X86-NEXT: xorl {{[0-9]+}}(%esp), %eax
10 ; X86-NEXT: # kill: def $ax killed $ax killed $eax
14 ; X64: # %bb.0: # %entry
15 ; X64-NEXT: movl %edi, %eax
16 ; X64-NEXT: xorl $21998, %eax # imm = 0x55EE
17 ; X64-NEXT: # kill: def $ax killed $ax killed $eax
20 %0 = xor i16 %x, 21998
24 define signext i16 @bar(i16 signext %x) nounwind {
26 ; X86: # %bb.0: # %entry
27 ; X86-NEXT: movl $54766, %eax # imm = 0xD5EE
28 ; X86-NEXT: xorl {{[0-9]+}}(%esp), %eax
29 ; X86-NEXT: # kill: def $ax killed $ax killed $eax
33 ; X64: # %bb.0: # %entry
34 ; X64-NEXT: movl %edi, %eax
35 ; X64-NEXT: xorl $54766, %eax # imm = 0xD5EE
36 ; X64-NEXT: # kill: def $ax killed $ax killed $eax
39 %0 = xor i16 %x, 54766
43 define signext i16 @baz(i16* %x, i16 signext %y) nounwind {
45 ; X86: # %bb.0: # %entry
46 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
47 ; X86-NEXT: movzwl (%eax), %eax
48 ; X86-NEXT: subw {{[0-9]+}}(%esp), %ax
52 ; X64: # %bb.0: # %entry
53 ; X64-NEXT: movzwl (%rdi), %eax
54 ; X64-NEXT: subl %esi, %eax
55 ; X64-NEXT: # kill: def $ax killed $ax killed $eax
58 %0 = load i16, i16* %x
63 define void @bat(i16* %a, i16* %x, i16 signext %y) nounwind {
65 ; X86: # %bb.0: # %entry
66 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
67 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
68 ; X86-NEXT: movzwl (%ecx), %ecx
69 ; X86-NEXT: subw {{[0-9]+}}(%esp), %cx
70 ; X86-NEXT: movw %cx, (%eax)
74 ; X64: # %bb.0: # %entry
75 ; X64-NEXT: movzwl (%rsi), %eax
76 ; X64-NEXT: subl %edx, %eax
77 ; X64-NEXT: movw %ax, (%rdi)
80 %0 = load i16, i16* %x
82 store i16 %sub, i16* %a