Add test case for testing InstCombine with arbitrary precision integer
[oota-llvm.git] / test / Transforms / InstCombine / apint-mul1.ll
diff --git a/test/Transforms/InstCombine/apint-mul1.ll b/test/Transforms/InstCombine/apint-mul1.ll
new file mode 100644 (file)
index 0000000..58f3bc9
--- /dev/null
@@ -0,0 +1,12 @@
+; This test makes sure that mul instructions are properly eliminated.
+; This test is for Integer BitWidth < 64 && BitWidth % 2 != 0.
+;
+
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep mul
+
+implementation
+
+define i17 @test1(i17 %X) {
+    %Y = mul i17 %X, 1024
+    ret i17 %Y
+}