diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
commit | cd749a9c07f1de2fb8affde90537efa4bc3e7c54 (patch) | |
tree | b21f6de4e08b89bb7931806bab798fc2a5e3a686 /test/CodeGen/XCore/sext.ll | |
parent | 72621d11de5b873f1695f391eb95f0b336c3d2d4 (diff) | |
download | FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.zip FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.tar.gz |
Update llvm to r84119.
Diffstat (limited to 'test/CodeGen/XCore/sext.ll')
-rw-r--r-- | test/CodeGen/XCore/sext.ll | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/CodeGen/XCore/sext.ll b/test/CodeGen/XCore/sext.ll new file mode 100644 index 0000000..9cd4ad6 --- /dev/null +++ b/test/CodeGen/XCore/sext.ll @@ -0,0 +1,32 @@ +; RUN: llc < %s -march=xcore | FileCheck %s +define i32 @sext1(i32 %a) { + %1 = trunc i32 %a to i1 + %2 = sext i1 %1 to i32 + ret i32 %2 +} +; CHECK: sext1: +; CHECK: sext r0, 1 + +define i32 @sext2(i32 %a) { + %1 = trunc i32 %a to i2 + %2 = sext i2 %1 to i32 + ret i32 %2 +} +; CHECK: sext2: +; CHECK: sext r0, 2 + +define i32 @sext8(i32 %a) { + %1 = trunc i32 %a to i8 + %2 = sext i8 %1 to i32 + ret i32 %2 +} +; CHECK: sext8: +; CHECK: sext r0, 8 + +define i32 @sext16(i32 %a) { + %1 = trunc i32 %a to i16 + %2 = sext i16 %1 to i32 + ret i32 %2 +} +; CHECK: sext16: +; CHECK: sext r0, 16 |