Changes in directory llvm/lib/Target/X86:
README.txt updated: 1.131 -> 1.132 --- Log message: new note --- Diffs of the changes: (+32 -0) README.txt | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+) Index: llvm/lib/Target/X86/README.txt diff -u llvm/lib/Target/X86/README.txt:1.131 llvm/lib/Target/X86/README.txt:1.132 --- llvm/lib/Target/X86/README.txt:1.131 Tue Sep 12 22:54:54 2006 +++ llvm/lib/Target/X86/README.txt Tue Sep 12 23:19:50 2006 @@ -643,3 +643,35 @@ This is a simple DAGCombine to propagate the zext through the and. //===---------------------------------------------------------------------===// + +GCC's ix86_expand_int_movcc function (in i386.c) has a ton of interesting +simplifications for integer "x cmp y ? a : b". For example, instead of: + +int G; +void f(int X, int Y) { + G = X < 0 ? 14 : 13; +} + +compiling to: + +_f: + movl $14, %eax + movl $13, %ecx + movl 4(%esp), %edx + testl %edx, %edx + cmovl %eax, %ecx + movl %ecx, _G + ret + +it could be: +_f: + movl 4(%esp), %eax + sarl $31, %eax + notl %eax + addl $14, %eax + movl %eax, _G + ret + +etc. + +//===---------------------------------------------------------------------===// _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits