diff options
author | Chris Lattner <sabre@nondot.org> | 2006-09-21 06:14:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-09-21 06:14:31 +0000 |
commit | 111c22824115ed77a8f14e555c10880d07a45eb4 (patch) | |
tree | eb685003a19d96dbbf7b0e021abb6c1387e0e5a7 /lib/Transforms/Utils/InlineFunction.cpp | |
parent | 6007b84a5bdcba9ee012418fedd32c236aad2cf6 (diff) |
Compile:
int %test(ulong *%tmp) {
%tmp = load ulong* %tmp ; <ulong> [#uses=1]
%tmp.mask = shr ulong %tmp, ubyte 50 ; <ulong> [#uses=1]
%tmp.mask = cast ulong %tmp.mask to ubyte
%tmp2 = and ubyte %tmp.mask, 3 ; <ubyte> [#uses=1]
%tmp2 = cast ubyte %tmp2 to int ; <int> [#uses=1]
ret int %tmp2
}
to:
_test:
movl 4(%esp), %eax
movl 4(%eax), %eax
shrl $18, %eax
andl $3, %eax
ret
instead of:
_test:
movl 4(%esp), %eax
movl 4(%eax), %eax
shrl $18, %eax
# TRUNCATE movb %al, %al
andb $3, %al
movzbl %al, %eax
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30558 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/InlineFunction.cpp')
0 files changed, 0 insertions, 0 deletions