diff options
author | Tanya Lattner <tonic@nondot.org> | 2008-02-17 20:02:20 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2008-02-17 20:02:20 +0000 |
commit | 6263f94674cd0974b9a4cc525cbe70db65fc9939 (patch) | |
tree | 0a2fe45a96ee63e58e105f65957fc5b9ffe9dc0b /test/CodeGen/ARM/rev.ll | |
parent | 456012c72e8596e36596ab3798b1d271477955ef (diff) |
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/rev.ll')
-rw-r--r-- | test/CodeGen/ARM/rev.ll | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/test/CodeGen/ARM/rev.ll b/test/CodeGen/ARM/rev.ll index 0072daef59..68f6264e8a 100644 --- a/test/CodeGen/ARM/rev.ll +++ b/test/CodeGen/ARM/rev.ll @@ -1,29 +1,27 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v6 | grep rev16 -; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+v6 | grep revsh +; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | grep rev16 +; RUN: llvm-as < %s | llc -march=arm -mattr=+v6 | grep revsh -int %test1(uint %X) { - %tmp1 = shr uint %X, ubyte 8 ; <uint> [#uses=1] - %tmp1 = cast uint %tmp1 to int ; <int> [#uses=2] - %X15 = cast uint %X to int ; <int> [#uses=1] - %tmp4 = shl int %X15, ubyte 8 ; <int> [#uses=2] - %tmp2 = and int %tmp1, 16711680 ; <int> [#uses=1] - %tmp5 = and int %tmp4, -16777216 ; <int> [#uses=1] - %tmp9 = and int %tmp1, 255 ; <int> [#uses=1] - %tmp13 = and int %tmp4, 65280 ; <int> [#uses=1] - %tmp6 = or int %tmp5, %tmp2 ; <int> [#uses=1] - %tmp10 = or int %tmp6, %tmp13 ; <int> [#uses=1] - %tmp14 = or int %tmp10, %tmp9 ; <int> [#uses=1] - ret int %tmp14 +define i32 @test1(i32 %X) { + %tmp1 = lshr i32 %X, 8 ; <i32> [#uses=3] + %X15 = bitcast i32 %X to i32 ; <i32> [#uses=1] + %tmp4 = shl i32 %X15, 8 ; <i32> [#uses=2] + %tmp2 = and i32 %tmp1, 16711680 ; <i32> [#uses=1] + %tmp5 = and i32 %tmp4, -16777216 ; <i32> [#uses=1] + %tmp9 = and i32 %tmp1, 255 ; <i32> [#uses=1] + %tmp13 = and i32 %tmp4, 65280 ; <i32> [#uses=1] + %tmp6 = or i32 %tmp5, %tmp2 ; <i32> [#uses=1] + %tmp10 = or i32 %tmp6, %tmp13 ; <i32> [#uses=1] + %tmp14 = or i32 %tmp10, %tmp9 ; <i32> [#uses=1] + ret i32 %tmp14 } -int %test2(uint %X) { ; revsh - %tmp1 = shr uint %X, ubyte 8 ; <uint> [#uses=1] - %tmp1 = cast uint %tmp1 to short ; <short> [#uses=1] - %tmp3 = cast uint %X to short ; <short> [#uses=1] - %tmp2 = and short %tmp1, 255 ; <short> [#uses=1] - %tmp4 = shl short %tmp3, ubyte 8 ; <short> [#uses=1] - %tmp5 = or short %tmp2, %tmp4 ; <short> [#uses=1] - %tmp5 = cast short %tmp5 to int ; <int> [#uses=1] - ret int %tmp5 +define i32 @test2(i32 %X) { + %tmp1 = lshr i32 %X, 8 ; <i32> [#uses=1] + %tmp1.upgrd.1 = trunc i32 %tmp1 to i16 ; <i16> [#uses=1] + %tmp3 = trunc i32 %X to i16 ; <i16> [#uses=1] + %tmp2 = and i16 %tmp1.upgrd.1, 255 ; <i16> [#uses=1] + %tmp4 = shl i16 %tmp3, 8 ; <i16> [#uses=1] + %tmp5 = or i16 %tmp2, %tmp4 ; <i16> [#uses=1] + %tmp5.upgrd.2 = sext i16 %tmp5 to i32 ; <i32> [#uses=1] + ret i32 %tmp5.upgrd.2 } - |