1 ; RUN: llc < %s -march=x86 -mcpu=yonah | FileCheck %s
5 ; CHECK: movl $42, %ecx
6 ; CHECK-NEXT: movl 4(%esp), %eax
7 ; CHECK-NEXT: andl $15, %eax
8 ; CHECK-NEXT: cmovnel %ecx, %eax
13 ; movl %eax, %ecx # bad: extra copy
15 ; testl $15, %eax # bad: peep obstructed
21 ; movl $15, %ecx # bad: larger encoding
30 ; testl %ecx, %ecx # bad: unnecessary test
35 define i32 @t1(i32 %X) nounwind {
37 %tmp2 = and i32 %X, 15 ; <i32> [#uses=2]
38 %tmp4 = icmp eq i32 %tmp2, 0 ; <i1> [#uses=1]
39 %retval = select i1 %tmp4, i32 %tmp2, i32 42 ; <i32> [#uses=1]