zjuacompiler/llvm — pull request #22 by zhulinchao (2014-06-11 03:59:20+00:00)
Title: add v64i2 MUL operation

这是简单的测试代码：
```llvm
@.str = private unnamed_addr constant [4 x i8] c"%u\0A\00", align 1

; Function Attrs: nounwind uwtable
define i32 @main() #0 {
entry:
%a = add i32 0, 1
%b = add i32 10, 20
%c = add i32 %a, %b
%d = zext i32 %c to i128
%e = zext i32 %b to i128
%x = bitcast i128 %d to <64 x i2>
%y = bitcast i128 %e to <64 x i2>
%z = mul <64 x i2> %x, %y
%ans = bitcast <64 x i2> %z to <4 x i32>
%ans_1 = extractelement <4 x i32> %ans, i32 0
%ans_2 = extractelement <4 x i32> %ans, i32 1
%ans_3 = extractelement <4 x i32> %ans, i32 2
%ans_4 = extractelement <4 x i32> %ans, i32 3

;%d = zext i4 %c to i32
;%e = bitcast <10 x i1> to i10
;%e = bitcast <5 x i4> to i20
;%a = add i3 2, 0
;%b = add i3 %a, 4
;%e = bitcast <4 x i3> to i12
;%d = zext i20 %e to i32
%call_1 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i32 0, i32 0), i32 %ans_1)
%call_2 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i32 0, i32 0), i32 %ans_2)
%call_3 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i32 0, i32 0), i32 %ans_3)
%call_4 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i32 0, i32 0), i32 %ans_4)
ret i32 0
}

declare i32 @printf(i8*, ...) #1
```