| #
6b6c81e6 |
| 19-Apr-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Defer some shl transforms to DAGCombine.
The shl instruction is used to represent multiplication by a constant power of two as well as bitwise left shifts. Some InstCombine transformations would tur
Defer some shl transforms to DAGCombine.
The shl instruction is used to represent multiplication by a constant power of two as well as bitwise left shifts. Some InstCombine transformations would turn an shl instruction into a bit mask operation, making it difficult for later analysis passes to recognize the constsnt multiplication.
Disable those shl transformations, deferring them to DAGCombine time. An 'shl X, C' instruction is now treated mostly the same was as 'mul X, C'.
These transformations are deferred:
(X >>? C) << C --> X & (-1 << C) (When X >> C has multiple uses) (X >>? C1) << C2 --> X << (C2-C1) & (-1 << C2) (When C2 > C1) (X >>? C1) << C2 --> X >>? (C1-C2) & (-1 << C2) (When C1 > C2)
The corresponding exact transformations are preserved, just like div-exact + mul:
(X >>?,exact C) << C --> X (X >>?,exact C1) << C2 --> X << (C2-C1) (X >>?,exact C1) << C2 --> X >>?,exact (C1-C2)
The disabled transformations could also prevent the instruction selector from recognizing rotate patterns in hash functions and cryptographic primitives. I have a test case for that, but it is too fragile.
llvm-svn: 155136
show more ...
|
|
Revision tags: llvmorg-3.1.0-rc1 |
|
| #
905969a1 |
| 18-Apr-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
FileCheckize
llvm-svn: 155010
|
| #
7ecc4e9b |
| 18-Apr-2012 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Nobody likes shifty instructions, but that was a bit strong.
llvm-svn: 155009
|
|
Revision tags: llvmorg-3.0.0, llvmorg-3.0.0-rc4, llvmorg-3.0.0-rc3, llvmorg-3.0.0-rc2, llvmorg-3.0.0-rc1, llvmorg-2.9.0, llvmorg-2.9.0-rc3, llvmorg-2.9.0-rc2, llvmorg-2.9.0-rc1, llvmorg-2.8.0, llvmorg-2.8.0-rc3, llvmorg-2.8.0-rc2, llvmorg-2.8.0-rc1, llvmorg-2.8.0-rc0, llvmorg-2.7.0 |
|
| #
d8509424 |
| 10-Jan-2010 |
Chris Lattner <sabre@nondot.org> |
change the preferred canonical form for a sign extension to be lshr+ashr instead of trunc+sext. We want to avoid type conversions whenever possible, it is easier to codegen expressions without trun
change the preferred canonical form for a sign extension to be lshr+ashr instead of trunc+sext. We want to avoid type conversions whenever possible, it is easier to codegen expressions without truncates and extensions.
llvm-svn: 93107
show more ...
|
|
Revision tags: llvmorg-2.6.0 |
|
| #
72a13d24 |
| 08-Sep-2009 |
Dan Gohman <gohman@apple.com> |
Use opt -S instead of piping bitcode output through llvm-dis.
llvm-svn: 81257
|
| #
9737a63e |
| 08-Sep-2009 |
Dan Gohman <gohman@apple.com> |
Change these tests to feed the assembly files to opt directly, instead of using llvm-as, now that opt supports this.
llvm-svn: 81226
|
|
Revision tags: llvmorg-2.5.0, llvmorg-2.4.0, llvmorg-2.3.0, llvmorg-2.2.0, llvmorg-2.1.0, llvmorg-2.0.0 |
|
| #
91948d4c |
| 14-Apr-2007 |
Reid Spencer <rspencer@reidspencer.com> |
For PR1319: Upgrade tests to work with new llvm.exp version of llvm_runtest.
llvm-svn: 36013
|
| #
562b715d |
| 23-Mar-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Add more test cases for APIntified InstCombine.
llvm-svn: 35288
|