define i32 @util_make_and_i1(i32 %a, i32 %b) { %a_i1 = icmp ne i32 %a, 0 %b_i1 = icmp ne i32 %b, 0 %res_i1 = and i1 %a_i1, %b_i1 %res = zext i1 %res_i1 to i32 ret i32 %res } define i32 @util_make_or_i1(i32 %a, i32 %b) { %a_i1 = icmp ne i32 %a, 0 %b_i1 = icmp ne i32 %b, 0 %res_i1 = or i1 %a_i1, %b_i1 %res = zext i1 %res_i1 to i32 ret i32 %res } define i16 @util_make_concat2(i8 %a, i8 %b) { %tmp = alloca i16 %tmp8 = bitcast i16* %tmp to i8* %p0 = getelementptr i8* %tmp8, i32 0 %p1 = getelementptr i8* %tmp8, i32 1 store i8 %b, i8* %p0 store i8 %a, i8* %p1 %concat = load i16* %tmp ret i16 %concat } define i32 @util_make_concat4(i8 %a, i8 %b, i8 %c, i8 %d) { %tmp = alloca i32 %tmp8 = bitcast i32* %tmp to i8* %p0 = getelementptr i8* %tmp8, i32 0 %p1 = getelementptr i8* %tmp8, i32 1 %p2 = getelementptr i8* %tmp8, i32 2 %p3 = getelementptr i8* %tmp8, i32 3 store i8 %d, i8* %p0 store i8 %c, i8* %p1 store i8 %b, i8* %p2 store i8 %a, i8* %p3 %concat = load i32* %tmp ret i32 %concat } define i64 @util_make_concat8(i8 %a, i8 %b, i8 %c, i8 %d, i8 %e, i8 %f, i8 %g, i8 %h) { %tmp = alloca i64 %tmp8 = bitcast i64* %tmp to i8* %p0 = getelementptr i8* %tmp8, i32 0 %p1 = getelementptr i8* %tmp8, i32 1 %p2 = getelementptr i8* %tmp8, i32 2 %p3 = getelementptr i8* %tmp8, i32 3 %p4 = getelementptr i8* %tmp8, i32 4 %p5 = getelementptr i8* %tmp8, i32 5 %p6 = getelementptr i8* %tmp8, i32 6 %p7 = getelementptr i8* %tmp8, i32 7 store i8 %h, i8* %p0 store i8 %g, i8* %p1 store i8 %f, i8* %p2 store i8 %e, i8* %p3 store i8 %d, i8* %p4 store i8 %c, i8* %p5 store i8 %b, i8* %p6 store i8 %a, i8* %p7 %concat = load i64* %tmp ret i64 %concat } define i32 @util_make_select(i32 %cond, i32 %t, i32 %f) { %cond_i1 = icmp ne i32 %cond, 0 %res = select i1 %cond_i1, i32 %t, i32 %f ret i32 %res }