1; RUN: llc < %s -mtriple=x86_64-apple-macosx | FileCheck %s 2 3; rdar://12081007 4 5; CHECK-LABEL: and_1: 6; CHECK: andb 7; CHECK-NEXT: cmovnel 8; CHECK: ret 9define i32 @and_1(i8 zeroext %a, i8 zeroext %b, i32 %x) { 10 %1 = and i8 %b, %a 11 %2 = icmp ne i8 %1, 0 12 %3 = select i1 %2, i32 %x, i32 0 13 ret i32 %3 14} 15 16; CHECK-LABEL: and_2: 17; CHECK: andb 18; CHECK-NEXT: setne 19; CHECK: ret 20define zeroext i1 @and_2(i8 zeroext %a, i8 zeroext %b) { 21 %1 = and i8 %b, %a 22 %2 = icmp ne i8 %1, 0 23 ret i1 %2 24} 25 26; CHECK-LABEL: xor_1: 27; CHECK: xorb 28; CHECK-NEXT: cmovnel 29; CHECK: ret 30define i32 @xor_1(i8 zeroext %a, i8 zeroext %b, i32 %x) { 31 %1 = xor i8 %b, %a 32 %2 = icmp ne i8 %1, 0 33 %3 = select i1 %2, i32 %x, i32 0 34 ret i32 %3 35} 36 37; CHECK-LABEL: xor_2: 38; CHECK: xorb 39; CHECK-NEXT: setne 40; CHECK: ret 41define zeroext i1 @xor_2(i8 zeroext %a, i8 zeroext %b) { 42 %1 = xor i8 %b, %a 43 %2 = icmp ne i8 %1, 0 44 ret i1 %2 45} 46