[llvm-commits] CVS: llvm/lib/Target/X86/README.txt
Chris Lattner
sabre at nondot.org
Thu Oct 12 15:01:40 PDT 2006
Changes in directory llvm/lib/Target/X86:
README.txt updated: 1.141 -> 1.142
---
Log message:
add a note
---
Diffs of the changes: (+27 -0)
README.txt | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+)
Index: llvm/lib/Target/X86/README.txt
diff -u llvm/lib/Target/X86/README.txt:1.141 llvm/lib/Target/X86/README.txt:1.142
--- llvm/lib/Target/X86/README.txt:1.141 Fri Oct 6 12:39:34 2006
+++ llvm/lib/Target/X86/README.txt Thu Oct 12 17:01:26 2006
@@ -734,3 +734,30 @@
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?
+
More information about the llvm-commits
mailing list