1 ; RUN: llc -march=x86-64 < %s | FileCheck %s
3 define i8 @test1(i8 %a, i8 %b) nounwind {
4 %cmp = icmp ult i8 %a, %b
5 %cond = zext i1 %cmp to i8
6 %add = add i8 %cond, %b
12 define i32 @test2(i32 %a, i32 %b) nounwind {
13 %cmp = icmp ult i32 %a, %b
14 %cond = zext i1 %cmp to i32
15 %add = add i32 %cond, %b
21 define i64 @test3(i64 %a, i64 %b) nounwind {
22 %cmp = icmp ult i64 %a, %b
23 %conv = zext i1 %cmp to i64
24 %add = add i64 %conv, %b
30 define i8 @test4(i8 %a, i8 %b) nounwind {
31 %cmp = icmp ult i8 %a, %b
32 %cond = zext i1 %cmp to i8
33 %sub = sub i8 %b, %cond
39 define i32 @test5(i32 %a, i32 %b) nounwind {
40 %cmp = icmp ult i32 %a, %b
41 %cond = zext i1 %cmp to i32
42 %sub = sub i32 %b, %cond
48 define i64 @test6(i64 %a, i64 %b) nounwind {
49 %cmp = icmp ult i64 %a, %b
50 %conv = zext i1 %cmp to i64
51 %sub = sub i64 %b, %conv
57 define i8 @test7(i8 %a, i8 %b) nounwind {
58 %cmp = icmp ult i8 %a, %b
59 %cond = sext i1 %cmp to i8
60 %sub = sub i8 %b, %cond
66 define i32 @test8(i32 %a, i32 %b) nounwind {
67 %cmp = icmp ult i32 %a, %b
68 %cond = sext i1 %cmp to i32
69 %sub = sub i32 %b, %cond
75 define i64 @test9(i64 %a, i64 %b) nounwind {
76 %cmp = icmp ult i64 %a, %b
77 %conv = sext i1 %cmp to i64
78 %sub = sub i64 %b, %conv