Reid Spencer
88d0496d66
Correct the description of srem. remainder follows the dividend not the
...
divisor!
llvm-svn: 35303
2007-03-24 22:23:39 +00:00
Reid Spencer
c1dfceab8b
Correct the implementation of srem to be remainder, not modulus. The sign of
...
the result must follow the sign of the divisor.
llvm-svn: 35302
2007-03-24 21:56:22 +00:00
Reid Spencer
ffa19b617d
Fix incorrect test cases for srem. The definition of srem is a remainder so
...
that the sign of the result follows the sign of the divisor.
llvm-svn: 35301
2007-03-24 21:55:26 +00:00
Reid Spencer
52ea41bb97
Clean up this interface:
...
1. Group similar methods into doxygen groups
2. Reorganize the groups into a consist flow.
3. Significantly improve the quality of the documentation on several methods
4. Rewrite srem and sdiv to eliminate a copy and improve readability.
5. Eliminate unneeded forward references.
llvm-svn: 35300
2007-03-24 18:09:18 +00:00
Chris Lattner
57d0c197e6
don't rely on ADL
...
llvm-svn: 35299
2007-03-24 17:37:03 +00:00
Chris Lattner
3a16450eaf
add a valuetype for v1i64, which is needed by mmx.
...
llvm-svn: 35298
2007-03-24 17:36:26 +00:00
Zhou Sheng
ce8c7becec
Make some codes more efficient.
...
llvm-svn: 35297
2007-03-24 15:34:37 +00:00
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
ad01036d5c
This is dead. DEAD I tells you!!
...
llvm-svn: 35291
2007-03-23 22:42:04 +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
a450c790e7
Add more test cases for APIntified InstCombine.
...
llvm-svn: 35288
2007-03-23 21:57:47 +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
eebf90ce0b
Add test case for testing InstCombine with arbitrary precision integer
...
types. These tests mimic the integer test cases in the normal InstCombine
test suite but use "strange" integer bit widths.
Most tests written by Zhou Sheng, a few by me.
llvm-svn: 35284
2007-03-23 20:48:34 +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
Dan Gohman
42a3f4e16e
Add the 'explicit' keyword to several constructors that accept one
...
argument that don't appear intended as implicit-conversion operators.
llvm-svn: 35280
2007-03-23 18:44:11 +00:00
Duncan Sands
bce4648a05
Test handling of switches with wide case ranges.
...
llvm-svn: 35279
2007-03-23 07:17:52 +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
Duncan Sands
9ee02c3f2e
The -funcresolve and -raise options no longer exist.
...
llvm-svn: 35272
2007-03-22 21:06:50 +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
Jeff Cohen
53cc90b34c
Cleanup obsolete stuff.
...
llvm-svn: 35268
2007-03-22 19:13:29 +00:00
Jeff Cohen
2f87ca6cc7
Be more explicit concerning argument sizes.
...
Use VC++ byteswap intrinsics.
llvm-svn: 35267
2007-03-22 19:11:57 +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
Evan Cheng
8c8e97507d
Unbreak non-debug builds.
...
llvm-svn: 35264
2007-03-22 07:43:51 +00:00
Reid Spencer
91c2777f40
Make this test actually match the generated code.
...
llvm-svn: 35263
2007-03-22 02:53:05 +00:00
Reid Spencer
3fd4e45972
Add noreturn function attribute.
...
llvm-svn: 35262
2007-03-22 02:18:56 +00:00
Reid Spencer
648d9f53ca
Add tests for nounwind and noreturn function attributes.
...
llvm-svn: 35261
2007-03-22 02:15:17 +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
Reid Spencer
3dd6681b9e
Preview nounwind function attribute.
...
llvm-svn: 35256
2007-03-22 02:02:11 +00:00
Evan Cheng
9992bbc5a0
Another test case.
...
llvm-svn: 35255
2007-03-22 01:55:16 +00:00
Evan Cheng
d7be4893f4
More opportunities to reduce load size.
...
llvm-svn: 35254
2007-03-22 01:54:19 +00:00
Evan Cheng
1a651088b1
Test case for PR1257
...
llvm-svn: 35253
2007-03-22 01:52:57 +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
8862d80d67
Test case for PR1248
...
llvm-svn: 35251
2007-03-22 00:49:40 +00:00