diff options
author | Jim Grosbach <grosbach@apple.com> | 2011-07-01 21:12:19 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2011-07-01 21:12:19 +0000 |
commit | a7603982dbf9e240ecc7ed6eddcd1cdb868107ac (patch) | |
tree | 87a983d92fb76b9bfbd27279864c36283ec030bc /test/CodeGen/Thumb2/thumb2-mulhi.ll | |
parent | 5b1b4489cf3a0f56f8be0673fc5cc380a32d277b (diff) | |
download | llvm-a7603982dbf9e240ecc7ed6eddcd1cdb868107ac.tar.gz llvm-a7603982dbf9e240ecc7ed6eddcd1cdb868107ac.tar.bz2 llvm-a7603982dbf9e240ecc7ed6eddcd1cdb868107ac.tar.xz |
ARMv7M vs. ARMv7E-M support.
The DSP instructions in the Thumb2 instruction set are an optional extension
in the Cortex-M* archtitecture. When present, the implementation is considered
an "ARMv7E-M implementation," and when not, an "ARMv7-M implementation."
Add a subtarget feature hook for the v7e-m instructions and hook it up. The
cortex-m3 cpu is an example of a v7m implementation, while the cortex-m4 is
a v7e-m implementation.
rdar://9572992
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134261 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Thumb2/thumb2-mulhi.ll')
-rw-r--r-- | test/CodeGen/Thumb2/thumb2-mulhi.ll | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/CodeGen/Thumb2/thumb2-mulhi.ll b/test/CodeGen/Thumb2/thumb2-mulhi.ll index 5d47770aed..9d4840a2de 100644 --- a/test/CodeGen/Thumb2/thumb2-mulhi.ll +++ b/test/CodeGen/Thumb2/thumb2-mulhi.ll @@ -1,7 +1,8 @@ -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep smmul | count 1 -; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep umull | count 1 +; RUN: llc < %s -march=thumb -mattr=+thumb2,+t2dsp | FileCheck %s define i32 @smulhi(i32 %x, i32 %y) { +; CHECK: smulhi +; CHECK: smmul r0, r1, r0 %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] @@ -11,6 +12,8 @@ define i32 @smulhi(i32 %x, i32 %y) { } define i32 @umulhi(i32 %x, i32 %y) { +; CHECK: umulhi +; CHECK: umull r1, r0, r1, r0 %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] |