diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-08-08 19:49:37 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-08-08 19:49:37 +0000 |
commit | 2cb1dfa4464c8dc551d93e0ce34d7a2f797304db (patch) | |
tree | ad754347739ea6d0bc1e9fa7639617162e4ddd3d /test/CodeGen/Thumb2 | |
parent | 08de97a5b024c3dc7dd051ecaa63d7ec1a27a5cf (diff) | |
download | external_llvm-2cb1dfa4464c8dc551d93e0ce34d7a2f797304db.zip external_llvm-2cb1dfa4464c8dc551d93e0ce34d7a2f797304db.tar.gz external_llvm-2cb1dfa4464c8dc551d93e0ce34d7a2f797304db.tar.bz2 |
Fix up the patterns for SXTB, SXTH, UXTB, and UXTH so that they are correctly active without HasT2ExtractPack. PR10611.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137061 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Thumb2')
-rw-r--r-- | test/CodeGen/Thumb2/thumb2-sxt-uxt.ll | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/CodeGen/Thumb2/thumb2-sxt-uxt.ll b/test/CodeGen/Thumb2/thumb2-sxt-uxt.ll new file mode 100644 index 0000000..ab888e6 --- /dev/null +++ b/test/CodeGen/Thumb2/thumb2-sxt-uxt.ll @@ -0,0 +1,29 @@ +; RUN: llc < %s -march=thumb -mcpu=cortex-m3 | FileCheck %s + +define i32 @test1(i16 zeroext %z) nounwind { +; CHECK: test1: +; CHECK: sxth + %r = sext i16 %z to i32 + ret i32 %r +} + +define i32 @test2(i8 zeroext %z) nounwind { +; CHECK: test2: +; CHECK: sxtb + %r = sext i8 %z to i32 + ret i32 %r +} + +define i32 @test3(i16 signext %z) nounwind { +; CHECK: test3: +; CHECK: uxth + %r = zext i16 %z to i32 + ret i32 %r +} + +define i32 @test4(i8 signext %z) nounwind { +; CHECK: test4: +; CHECK: uxtb + %r = zext i8 %z to i32 + ret i32 %r +} |