diff options
author | Christopher Lamb <christopher.lamb@gmail.com> | 2007-08-10 21:48:46 +0000 |
---|---|---|
committer | Christopher Lamb <christopher.lamb@gmail.com> | 2007-08-10 21:48:46 +0000 |
commit | c59e52108bbfca50b23c5d10706484d4b012c344 (patch) | |
tree | 66ef3643772f9ca45555550bf33a82adfa46f1ea /test/CodeGen/X86/2007-08-10-SignExtSubreg.ll | |
parent | 6f41435879ccf860aaceef51a2e06bf3f6d25188 (diff) | |
download | llvm-c59e52108bbfca50b23c5d10706484d4b012c344.tar.gz llvm-c59e52108bbfca50b23c5d10706484d4b012c344.tar.bz2 llvm-c59e52108bbfca50b23c5d10706484d4b012c344.tar.xz |
Increase efficiency of sign_extend_inreg by using subregisters for truncation. As the README suggests sign_extend_subreg is selected to (sext(trunc)).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41010 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/2007-08-10-SignExtSubreg.ll')
-rw-r--r-- | test/CodeGen/X86/2007-08-10-SignExtSubreg.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2007-08-10-SignExtSubreg.ll b/test/CodeGen/X86/2007-08-10-SignExtSubreg.ll new file mode 100644 index 0000000000..c94096a9b7 --- /dev/null +++ b/test/CodeGen/X86/2007-08-10-SignExtSubreg.ll @@ -0,0 +1,10 @@ +; RUN: llvm-as < %s | llc -march=x86 | grep {movsbl .al, .eax} + +@X = global i32 0 ; <i32*> [#uses=1] + +define i8 @_Z3fooi(i32 %x) signext { +entry: + store i32 %x, i32* @X, align 4 + %retval67 = trunc i32 %x to i8 ; <i8> [#uses=1] + ret i8 %retval67 +}
\ No newline at end of file |