1
; RUN: llc < %s -mtriple=x86_64-apple-darwin -asm-verbose=false | FileCheck %s -check-prefix=64BIT
4
; In 32-bit the partial register stall would degrade performance.
6
define zeroext i16 @t1(i16 zeroext %c, i16 zeroext %k) nounwind ssp {
9
; 32BIT: movw 20(%esp), %ax
10
; 32BIT-NOT: movw %ax, %cx
11
; 32BIT: leal 1(%eax), %ecx
14
; 64BIT-NOT: movw %si, %ax
15
; 64BIT: leal 1(%rsi), %eax
16
%0 = icmp eq i16 %k, %c ; <i1> [#uses=1]
17
%1 = add i16 %k, 1 ; <i16> [#uses=3]
18
br i1 %0, label %bb, label %bb1
21
tail call void @foo(i16 zeroext %1) nounwind
28
define zeroext i16 @t2(i16 zeroext %c, i16 zeroext %k) nounwind ssp {
31
; 32BIT: movw 20(%esp), %ax
32
; 32BIT-NOT: movw %ax, %cx
33
; 32BIT: leal -1(%eax), %ecx
36
; 64BIT-NOT: movw %si, %ax
37
; 64BIT: leal -1(%rsi), %eax
38
%0 = icmp eq i16 %k, %c ; <i1> [#uses=1]
39
%1 = add i16 %k, -1 ; <i16> [#uses=3]
40
br i1 %0, label %bb, label %bb1
43
tail call void @foo(i16 zeroext %1) nounwind
50
declare void @foo(i16 zeroext)
52
define zeroext i16 @t3(i16 zeroext %c, i16 zeroext %k) nounwind ssp {
55
; 32BIT: movw 20(%esp), %ax
56
; 32BIT-NOT: movw %ax, %cx
57
; 32BIT: leal 2(%eax), %ecx
60
; 64BIT-NOT: movw %si, %ax
61
; 64BIT: leal 2(%rsi), %eax
62
%0 = add i16 %k, 2 ; <i16> [#uses=3]
63
%1 = icmp eq i16 %k, %c ; <i1> [#uses=1]
64
br i1 %1, label %bb, label %bb1
67
tail call void @foo(i16 zeroext %0) nounwind
74
define zeroext i16 @t4(i16 zeroext %c, i16 zeroext %k) nounwind ssp {
77
; 32BIT: movw 16(%esp), %ax
78
; 32BIT: movw 20(%esp), %cx
79
; 32BIT-NOT: movw %cx, %dx
80
; 32BIT: leal (%ecx,%eax), %edx
83
; 64BIT-NOT: movw %si, %ax
84
; 64BIT: leal (%rsi,%rdi), %eax
85
%0 = add i16 %k, %c ; <i16> [#uses=3]
86
%1 = icmp eq i16 %k, %c ; <i1> [#uses=1]
87
br i1 %1, label %bb, label %bb1
90
tail call void @foo(i16 zeroext %0) nounwind