summaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM/mulhi.ll
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2008-02-17 20:02:20 +0000
committerTanya Lattner <tonic@nondot.org>2008-02-17 20:02:20 +0000
commit6263f94674cd0974b9a4cc525cbe70db65fc9939 (patch)
tree0a2fe45a96ee63e58e105f65957fc5b9ffe9dc0b /test/CodeGen/ARM/mulhi.ll
parent456012c72e8596e36596ab3798b1d271477955ef (diff)
downloadllvm-6263f94674cd0974b9a4cc525cbe70db65fc9939.tar.gz
llvm-6263f94674cd0974b9a4cc525cbe70db65fc9939.tar.bz2
llvm-6263f94674cd0974b9a4cc525cbe70db65fc9939.tar.xz
Remove llvm-upgrade.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47238 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/mulhi.ll')
-rw-r--r--test/CodeGen/ARM/mulhi.ll35
1 files changed, 17 insertions, 18 deletions
diff --git a/test/CodeGen/ARM/mulhi.ll b/test/CodeGen/ARM/mulhi.ll
index bed3dba2a0..de75e96b87 100644
--- a/test/CodeGen/ARM/mulhi.ll
+++ b/test/CodeGen/ARM/mulhi.ll
@@ -1,23 +1,22 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v6
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v6 | \
+; RUN: llvm-as < %s | llc -march=arm -mattr=+v6
+; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | \
; RUN: grep smmul | count 1
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep umull | count 1
+; RUN: llvm-as < %s | llc -march=arm | grep umull | count 1
-int %smulhi(int %x, int %y) {
- %tmp = cast int %x to ulong ; <ulong> [#uses=1]
- %tmp1 = cast int %y to ulong ; <ulong> [#uses=1]
- %tmp2 = mul ulong %tmp1, %tmp ; <ulong> [#uses=1]
- %tmp3 = shr ulong %tmp2, ubyte 32 ; <ulong> [#uses=1]
- %tmp3 = cast ulong %tmp3 to int ; <int> [#uses=1]
- ret int %tmp3
+define i32 @smulhi(i32 %x, i32 %y) {
+ %tmp = sext i32 %x to i64 ; <i64> [#uses=1]
+ %tmp1 = sext i32 %y to i64 ; <i64> [#uses=1]
+ %tmp2 = mul i64 %tmp1, %tmp ; <i64> [#uses=1]
+ %tmp3 = lshr i64 %tmp2, 32 ; <i64> [#uses=1]
+ %tmp3.upgrd.1 = trunc i64 %tmp3 to i32 ; <i32> [#uses=1]
+ ret i32 %tmp3.upgrd.1
}
-int %umulhi(uint %x, uint %y) {
- %tmp = cast uint %x to ulong ; <ulong> [#uses=1]
- %tmp1 = cast uint %y to ulong ; <ulong> [#uses=1]
- %tmp2 = mul ulong %tmp1, %tmp ; <ulong> [#uses=1]
- %tmp3 = shr ulong %tmp2, ubyte 32 ; <ulong> [#uses=1]
- %tmp3 = cast ulong %tmp3 to int ; <int> [#uses=1]
- ret int %tmp3
+define i32 @umulhi(i32 %x, i32 %y) {
+ %tmp = zext i32 %x to i64 ; <i64> [#uses=1]
+ %tmp1 = zext i32 %y to i64 ; <i64> [#uses=1]
+ %tmp2 = mul i64 %tmp1, %tmp ; <i64> [#uses=1]
+ %tmp3 = lshr i64 %tmp2, 32 ; <i64> [#uses=1]
+ %tmp3.upgrd.2 = trunc i64 %tmp3 to i32 ; <i32> [#uses=1]
+ ret i32 %tmp3.upgrd.2
}
-