summaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-29 08:19:39 +0000
committerChris Lattner <sabre@nondot.org>2007-12-29 08:19:39 +0000
commit69bfbdfaeebf366b70a1aa3ba650685493da9e8c (patch)
treec545bd18ac9aca523d18116b85feea7f26904d68 /test/CodeGen
parentb15147ea4cc6716924ced6eff65358a95c35bd16 (diff)
downloadllvm-69bfbdfaeebf366b70a1aa3ba650685493da9e8c.tar.gz
llvm-69bfbdfaeebf366b70a1aa3ba650685493da9e8c.tar.bz2
llvm-69bfbdfaeebf366b70a1aa3ba650685493da9e8c.tar.xz
this xform is implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45404 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/X86/sext-load.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/X86/sext-load.ll b/test/CodeGen/X86/sext-load.ll
new file mode 100644
index 0000000000..a6d1080bd8
--- /dev/null
+++ b/test/CodeGen/X86/sext-load.ll
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | llc -march=x86 | grep movsbl
+
+define i32 @foo(i32 %X) nounwind {
+entry:
+ %tmp12 = trunc i32 %X to i8 ; <i8> [#uses=1]
+ %tmp123 = sext i8 %tmp12 to i32 ; <i32> [#uses=1]
+ ret i32 %tmp123
+}
+