Chris Lattner
a04981fbda
add a bad case evan though of.
...
llvm-svn: 35296
2007-03-24 06:01:32 +00:00
Reid Spencer
b03fc33244
For PR1205:
...
Convert some calls to ConstantInt::getZExtValue() into getValue() and
use APInt facilities in the subsequent computations.
llvm-svn: 35294
2007-03-24 00:42:08 +00:00
Evan Cheng
a484f31d4b
Adjust offset to compensate for big endian machines.
...
llvm-svn: 35293
2007-03-24 00:02:43 +00:00
Anton Korobeynikov
63bff8af0c
Autodetect MMX & SSE stuff for AMD processors
...
llvm-svn: 35292
2007-03-23 23:46:48 +00:00
Bill Wendling
124f2c8706
PR1260:
...
Add final support to get the QT example to compile.
llvm-svn: 35290
2007-03-23 22:35:46 +00:00
Evan Cheng
84aecc56e7
Make sure SEXTLOAD of the specific type is supported on the target.
...
llvm-svn: 35289
2007-03-23 22:13:36 +00:00
Reid Spencer
01d252add1
For PR1205:
...
* APIntify visitAdd and visitSelectInst
* Remove unused uint64_t versions of utility functions that have been
replaced with APInt versions.
This completes most of the changes for APIntification of InstCombine. This
passes llvm-test and llvm/test/Transforms/InstCombine/APInt.
Patch by Zhou Sheng.
llvm-svn: 35287
2007-03-23 21:24:59 +00:00
Evan Cheng
7dd7666120
Also replace uses of SRL if that's also folded during ReduceLoadWidth().
...
llvm-svn: 35286
2007-03-23 20:55:21 +00:00
Reid Spencer
da8ec61ec4
For PR1205:
...
APIntify visitDiv, visitMul and visitRem.
Patch by Zhou Sheng.
llvm-svn: 35283
2007-03-23 20:05:17 +00:00
Chris Lattner
04baffb0c5
switch AddReachableCodeToWorklist from being recursive to being iterative.
...
llvm-svn: 35282
2007-03-23 19:17:18 +00:00
Reid Spencer
1fd12cf9f6
For PR1205:
...
APIntify several utility functions supporting logical operators and shift
operators.
Patch by Zhou Sheng.
llvm-svn: 35281
2007-03-23 18:46:34 +00:00
Reid Spencer
7a9c981d80
Fix constant fold of div by zero and rem by zero to match IEEE 754
...
requirements. We must return NaN in some cases and correctly signed
infinity in other cases. Passes CFP2006 (not that that says much).
llvm-svn: 35277
2007-03-23 05:33:23 +00:00
Zhou Sheng
e706d8f56d
Make the "KnownZero ^ TypeMask" computation just once.
...
llvm-svn: 35276
2007-03-23 03:13:21 +00:00
Zhou Sheng
6b7b4945f1
Simplify the code.
...
llvm-svn: 35275
2007-03-23 02:39:25 +00:00
Evan Cheng
62ccdaea67
A couple of bug fixes for reducing load width xform:
...
1. Address offset is in bytes.
2. Make sure truncate node uses are replaced with new load.
llvm-svn: 35274
2007-03-23 02:16:52 +00:00
Reid Spencer
9881580cec
For PR1205:
...
APInt support for logical operators in visitAnd, visitOr, and visitXor.
Patch by Zhou Sheng.
llvm-svn: 35273
2007-03-22 22:19:58 +00:00
Reid Spencer
74288268d3
For PR1205:
...
* APIntify commonIntCastTransforms
* APIntify visitTrunc
* APIntify visitZExt
Patch by Zhou Sheng.
llvm-svn: 35271
2007-03-22 20:56:53 +00:00
Reid Spencer
b6c09a009e
For PR1205:
...
* Re-enable the APInt version of MaskedValueIsZero.
* APIntify the Comput{Un}SignedMinMaxValuesFromKnownBits functions
* APIntify visitICmpInst.
llvm-svn: 35270
2007-03-22 20:36:03 +00:00
Bill Wendling
e6a9c6dfe6
We generate a shufflevector instruction, so we don't need the builtin
...
intrinsic.
llvm-svn: 35269
2007-03-22 20:29:26 +00:00
Bill Wendling
1bcad4c1cd
Support added for shifts and unpacking MMX instructions.
...
llvm-svn: 35266
2007-03-22 18:42:45 +00:00
Dan Gohman
d0a0ea9916
Change uses of Function::front to Function::getEntryBlock for readability.
...
llvm-svn: 35265
2007-03-22 16:38:57 +00:00
Reid Spencer
a2d8b5e7a1
Add the NoUnwind function attribute.
...
llvm-svn: 35260
2007-03-22 02:14:48 +00:00
Reid Spencer
620297a20c
Regenerate.
...
llvm-svn: 35259
2007-03-22 02:14:08 +00:00
Reid Spencer
6890147648
Add support for the noreturn and nounwind function attributes.
...
llvm-svn: 35258
2007-03-22 02:13:23 +00:00
Nick Lewycky
428523f51a
Fix broken optimization disabled by a logic bug.
...
Analyze GEPs. If the indices are all zero, transfer whether the pointer is
known to be not null through the GEP.
Add a few more cases for xor and shift instructions.
llvm-svn: 35257
2007-03-22 02:02:51 +00:00
Evan Cheng
d7be4893f4
More opportunities to reduce load size.
...
llvm-svn: 35254
2007-03-22 01:54:19 +00:00
Evan Cheng
da92165bab
Fix for PR1257. Bug in live range shortening as a result of copy coalescing
...
where the destination is dead.
llvm-svn: 35252
2007-03-22 01:26:05 +00:00
Reid Spencer
bdfbda05fb
For PR1248:
...
* Fix some indentation and comments in InsertRangeTest
* Add an "IsSigned" parameter to AddWithOverflow and make it handle signed
additions. Also, APIntify this function so it works with any bitwidth.
* For the icmp pred ([us]div %X, C1), C2 transforms, exit early if the
div instruction's RHS is zero.
* Finally, for icmp pred (sdiv %X, C1), -C2, fix an off-by-one error. The
HiBound needs to be incremented in order to get the range test correct.
llvm-svn: 35247
2007-03-21 23:19:50 +00:00
Dale Johannesen
44c0a5d545
repair x86 performance, dejagnu problems from previous change
...
llvm-svn: 35245
2007-03-21 21:51:52 +00:00
Anton Korobeynikov
c0842af02d
Add TODO list for MSIL backend
...
llvm-svn: 35244
2007-03-21 21:48:59 +00:00
Anton Korobeynikov
bc43d296b2
Let the new backend begin!
...
llvm-svn: 35242
2007-03-21 21:38:25 +00:00
Dale Johannesen
fb7b59f5dd
add generation of unnecessary push/pop around calls
...
llvm-svn: 35241
2007-03-21 21:16:39 +00:00
Evan Cheng
9867632e64
fold (truncate (srl (load x), c)) -> (smaller load (x+c/vt bits))
...
llvm-svn: 35239
2007-03-21 20:14:05 +00:00
Nicolas Geoffray
205541ef78
Protect R31's frame offset from being used by callee-saved registers, when R31
...
is the frame pointer.
llvm-svn: 35233
2007-03-21 16:44:14 +00:00
Zhou Sheng
427b6bec97
Fix a bug in getAllOnesValue() which broke
...
some test cases for bitwidth > 64.
llvm-svn: 35232
2007-03-21 04:34:37 +00:00
Evan Cheng
00a5cbf9e7
Mark re-materializable instructions.
...
llvm-svn: 35230
2007-03-21 00:16:56 +00:00
Evan Cheng
fb9c4c2edc
Updated.
...
llvm-svn: 35229
2007-03-20 22:32:39 +00:00
Evan Cheng
516a83595d
Potential spiller improvement.
...
llvm-svn: 35228
2007-03-20 22:22:38 +00:00
Dale Johannesen
3e422e3b49
do not share old induction variables when this would result in invalid
...
instructions (that would have to be split later)
llvm-svn: 35227
2007-03-20 21:54:54 +00:00
Dale Johannesen
50a22f6fe6
maintain LiveIn when splitting blocks (register scavenging needs it)
...
llvm-svn: 35226
2007-03-20 21:35:06 +00:00
Devang Patel
3a426e1c86
DominanceFrontier::calculate().
...
Avoid recursion, Use iterative algorithm.
llvm-svn: 35225
2007-03-20 21:25:31 +00:00
Jeff Cohen
8dea6ada6f
Fix some VC++ warnings.
...
llvm-svn: 35224
2007-03-20 20:43:18 +00:00
Jeff Cohen
21c7fc9c1f
Fix (and simplify) 48-bit byte swap.
...
Get pos/neg infinity the correct way.
llvm-svn: 35223
2007-03-20 20:42:36 +00:00
Devang Patel
18146cf2a2
LoopSimplify::FindPHIToPartitionLoops()
...
Use ETForest instead of DominatorSet.
llvm-svn: 35221
2007-03-20 20:18:12 +00:00
Lauro Ramos Venancio
632ac0e289
Code clean up.
...
llvm-svn: 35220
2007-03-20 20:09:03 +00:00
Evan Cheng
fe301e0f29
Minor bug.
...
llvm-svn: 35219
2007-03-20 19:32:11 +00:00
Lauro Ramos Venancio
11d7d3fcaf
bugfix: When the source register of CALL_NOLINK was LR, the following code was emitted:
...
mov lr, pc
bx lr
So, the function was not called.
llvm-svn: 35218
2007-03-20 17:57:23 +00:00
Reid Spencer
d37f0f007d
Regenerate.
...
llvm-svn: 35215
2007-03-20 17:19:31 +00:00
Reid Spencer
3cc307f4d7
Don't delete things before their last use (avoids bad reads).
...
llvm-svn: 35214
2007-03-20 17:18:33 +00:00
Lauro Ramos Venancio
9659c8befc
CopyToReg source operand can be a physical register.
...
llvm-svn: 35213
2007-03-20 16:46:44 +00:00