diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-10-12 22:01:26 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-10-12 22:01:26 +0000 |
| commit | 03fda13dbbdf5be8921c6eab72b43ee961a4bffd (patch) | |
| tree | 6d127d90cd6e6df95a998877a837bcc2fb1f87e3 /llvm/lib | |
| parent | d0620d2773a9958420f9ae02a24b5a5ed3a713f2 (diff) | |
| download | bcm5719-llvm-03fda13dbbdf5be8921c6eab72b43ee961a4bffd.tar.gz bcm5719-llvm-03fda13dbbdf5be8921c6eab72b43ee961a4bffd.zip | |
add a note
llvm-svn: 30921
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/X86/README.txt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/README.txt b/llvm/lib/Target/X86/README.txt index 3ee32cce055..84e1532284c 100644 --- a/llvm/lib/Target/X86/README.txt +++ b/llvm/lib/Target/X86/README.txt @@ -734,3 +734,30 @@ _foo: ret //===---------------------------------------------------------------------===// + +Consider the expansion of: + +uint %test3(uint %X) { + %tmp1 = rem uint %X, 255 + ret uint %tmp1 +} + +Currently it compiles to: + +... + movl $2155905153, %ecx + movl 8(%esp), %esi + movl %esi, %eax + mull %ecx +... + +This could be "reassociated" into: + + movl $2155905153, %eax + movl 8(%esp), %ecx + mull %ecx + +to avoid the copy. In fact, the existing two-address stuff would do this +except that mul isn't a commutative 2-addr instruction. I guess this has +to be done at isel time based on the #uses to mul? + |

