summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-19 08:07:05 +0000
committerChris Lattner <sabre@nondot.org>2005-01-19 08:07:05 +0000
commitde87d146ab8d76c5cd3932cc7288e88e8e278a4d (patch)
tree3f20c27f49032af8f7960657bdc1402cbb0cbbf1 /llvm/lib/Transforms
parentc4adfbbd0b66b861224e22fd888ecb76430f6b56 (diff)
downloadbcm5719-llvm-de87d146ab8d76c5cd3932cc7288e88e8e278a4d.tar.gz
bcm5719-llvm-de87d146ab8d76c5cd3932cc7288e88e8e278a4d.zip
Implement Regression/CodeGen/X86/rotate.ll: emit rotate instructions (which
typically cost 1 cycle) instead of shld/shrd instruction (which are typically 6 or more cycles). This also saves code space. For example, instead of emitting: rotr: mov %EAX, DWORD PTR [%ESP + 4] mov %CL, BYTE PTR [%ESP + 8] shrd %EAX, %EAX, %CL ret rotli: mov %EAX, DWORD PTR [%ESP + 4] shrd %EAX, %EAX, 27 ret Emit: rotr32: mov %CL, BYTE PTR [%ESP + 8] mov %EAX, DWORD PTR [%ESP + 4] ror %EAX, %CL ret rotli32: mov %EAX, DWORD PTR [%ESP + 4] ror %EAX, 27 ret We also emit byte rotate instructions which do not have a sh[lr]d counterpart at all. llvm-svn: 19692
Diffstat (limited to 'llvm/lib/Transforms')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud