[llvm-commits] [llvm] r92921 - /llvm/trunk/lib/Target/PowerPC/README.txt
Chris Lattner
sabre at nondot.org
Thu Jan 7 09:53:10 PST 2010
Author: lattner
Date: Thu Jan 7 11:53:10 2010
New Revision: 92921
URL: http://llvm.org/viewvc/llvm-project?rev=92921&view=rev
Log:
constant materialization could be improved.
Modified:
llvm/trunk/lib/Target/PowerPC/README.txt
Modified: llvm/trunk/lib/Target/PowerPC/README.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/README.txt?rev=92921&r1=92920&r2=92921&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/README.txt (original)
+++ llvm/trunk/lib/Target/PowerPC/README.txt Thu Jan 7 11:53:10 2010
@@ -7,6 +7,39 @@
===-------------------------------------------------------------------------===
+On PPC64, this:
+
+long f2 (long x) { return 0xfffffff000000000UL; }
+long f3 (long x) { return 0x1ffffffffUL; }
+
+could compile into:
+
+_f2:
+ li r3,-1
+ rldicr r3,r3,0,27
+ blr
+_f3:
+ li r3,-1
+ rldicl r3,r3,0,31
+ blr
+
+we produce:
+
+_f2:
+ lis r2, 4095
+ ori r2, r2, 65535
+ sldi r3, r2, 36
+ blr
+_f3:
+ li r2, 1
+ sldi r2, r2, 32
+ oris r2, r2, 65535
+ ori r3, r2, 65535
+ blr
+
+
+===-------------------------------------------------------------------------===
+
Support 'update' load/store instructions. These are cracked on the G5, but are
still a codesize win.
More information about the llvm-commits
mailing list