Nick Lewycky
0b6cdd1eff
Add 'umax' similar to 'smax' SCEV. Closes PR2003.
...
Parse reversed smax and umax as smin and umin and express them with negative
or binary-not SCEVs (which are really just subtract under the hood).
Parse 'xor %x, -1' as (-1 - %x).
Remove dead code (ConstantInt::get always returns a ConstantInt).
Don't use getIntegerSCEV(-1, Ty). The first value is an int, then it gets
passed into a uint64_t. Instead, create the -1 directly from
ConstantInt::getAllOnesValue().
llvm-svn: 47360
2008-02-20 06:48:22 +00:00
Evan Cheng
33ee06fa48
XFAIL this for now.
...
llvm-svn: 47355
2008-02-20 02:38:58 +00:00
Chris Lattner
aaafe47a55
this test requires sse2
...
llvm-svn: 47331
2008-02-19 18:07:46 +00:00
Chris Lattner
3a4ac3a69e
Don't fold and's into test instructions if they have multiple uses.
...
This compiles test-nofold.ll into:
_test:
movl $15, %ecx
andl 4(%esp), %ecx
testl %ecx, %ecx
movl $42, %eax
cmove %ecx, %eax
ret
instead of:
_test:
movl 4(%esp), %eax
movl %eax, %ecx
andl $15, %ecx
testl $15, %eax
movl $42, %eax
cmove %ecx, %eax
ret
llvm-svn: 47330
2008-02-19 17:37:35 +00:00
Chris Lattner
67f2a6c009
rename tests to avoid a test- prefix when they aren't related to the test instruction.
...
llvm-svn: 47329
2008-02-19 17:33:52 +00:00
Tanya Lattner
230c714773
Remove llvm-upgrade and update tests.
...
llvm-svn: 47325
2008-02-19 08:07:33 +00:00
Chris Lattner
8880d6ba5b
dead pass
...
llvm-svn: 47324
2008-02-19 07:58:11 +00:00
Chris Lattner
5400cc3907
Fix PR2060 by rejecting invalid types for integer constants.
...
llvm-svn: 47311
2008-02-19 04:36:07 +00:00
Nick Lewycky
69457748ab
Don't spew stats to stderr.
...
llvm-svn: 47308
2008-02-19 03:11:47 +00:00
Nick Lewycky
0560401b2e
Fix up the run line for this new test.
...
llc: for the -info-output-file option: requires a value!
llvm-svn: 47306
2008-02-19 02:58:36 +00:00
Evan Cheng
de4579d0b3
New test.
...
llvm-svn: 47302
2008-02-19 02:09:58 +00:00
Tanya Lattner
169eaef57b
Remove llvm-upgrade and update tests.
...
llvm-svn: 47297
2008-02-19 01:44:26 +00:00
Tanya Lattner
aeb9bb8ba4
Remove llvm-upgrade and update tests.
...
llvm-svn: 47296
2008-02-19 01:41:04 +00:00
Evan Cheng
bb577266bf
- When DAG combiner is folding a bit convert into a BUILD_VECTOR, it should check if it's essentially a SCALAR_TO_VECTOR. Avoid turning (v8i16) <10, u, u, u> to <10, 0, u, u, u, u, u, u>. Instead, simply convert it to a SCALAR_TO_VECTOR of the proper type.
...
- X86 now normalize SCALAR_TO_VECTOR to (BIT_CONVERT (v4i32 SCALAR_TO_VECTOR)). Get rid of X86ISD::S2VEC.
llvm-svn: 47290
2008-02-18 23:04:32 +00:00
Nick Lewycky
1f3c58df08
Correctly fold divide-by-constant, even when faced with overflow.
...
llvm-svn: 47287
2008-02-18 22:48:05 +00:00
Dan Gohman
70b9b2f77f
Don't mark scalar integer multiplication as Expand on x86, since x86
...
has plain one-result scalar integer multiplication instructions.
This avoids expanding such instructions into MUL_LOHI sequences that
must be special-cased at isel time, and avoids the problem with that
code that provented memory operands from being folded.
This fixes PR1874, addressesing the most common case. The uncommon
cases of optimizing multiply-high operations will require work
in DAGCombiner.
llvm-svn: 47277
2008-02-18 17:55:26 +00:00
Chris Lattner
a6dc8aaa3f
make this just a bit more strict.
...
llvm-svn: 47274
2008-02-18 17:33:10 +00:00
Owen Anderson
7b092ea631
Add support to GVN for performing sret return slot optimization. This means that, if an sret function tail calls
...
another sret function, it should pass its own sret parameter to the tail callee, allowing it to fill in the correct
return value. llvm-gcc does not emit this by default. Instead, it allocates space in the caller for the sret of
the tail call and then uses memcpy to copy the result into the caller's sret parameter. This optimization detects
and optimizes that case.
llvm-svn: 47265
2008-02-18 09:24:53 +00:00
Chris Lattner
9851db050b
optimize away stackrestore calls that have no intervening alloca or call.
...
llvm-svn: 47258
2008-02-18 06:12:38 +00:00
Chris Lattner
dd489bf3eb
upgrade this test.
...
llvm-svn: 47257
2008-02-18 06:11:00 +00:00
Chris Lattner
2fa904b3af
Fold (-x + -y) -> -(x+y) which promotes better association, fixing
...
the second half of PR2047
llvm-svn: 47244
2008-02-17 21:03:36 +00:00
Chris Lattner
4a34461d64
Split up subtracts into add+negate if they have a reassociable use or operand
...
that is also a subtract. This implements PR2047 and Transforms/Reassociate/subtest2.ll
llvm-svn: 47241
2008-02-17 20:51:26 +00:00
Chris Lattner
7cd16f34b3
upgrade and simplify this test.
...
llvm-svn: 47240
2008-02-17 20:48:43 +00:00
Tanya Lattner
03755061ae
Remove llvm-upgrade.
...
llvm-svn: 47238
2008-02-17 20:02:20 +00:00
Chris Lattner
1ce2265908
fix this test.
...
llvm-svn: 47232
2008-02-17 00:15:25 +00:00
Tanya Lattner
bcf113b2ca
Remove llvm-upgrade
...
llvm-svn: 47231
2008-02-17 00:15:09 +00:00
Tanya Lattner
71db645ff2
Remove llvm-upgrade.
...
llvm-svn: 47230
2008-02-17 00:13:09 +00:00
Chris Lattner
37c93d2a82
this test isn't useful since we added @ notation for globals.
...
llvm-svn: 47229
2008-02-17 00:12:03 +00:00
Chris Lattner
52d5239f6d
this line was commented out.
...
llvm-svn: 47228
2008-02-17 00:09:08 +00:00
Tanya Lattner
c08b5f0208
Remove llvm-upgrade and update tests.
...
llvm-svn: 47227
2008-02-16 23:55:46 +00:00
Tanya Lattner
1ffe4f2e88
Removing llvm upgrade, so remove tests specific to llvm-upgrade and update the tests that used it.
...
llvm-svn: 47225
2008-02-16 23:27:24 +00:00
Duncan Sands
cd0325cce1
Remove any 'nest' parameter attributes if the function
...
is not passed as an argument to a trampoline intrinsic.
llvm-svn: 47220
2008-02-16 20:56:04 +00:00
Andrew Lenharth
c178981b85
llvm.memory.barrier, and impl for x86 and alpha
...
llvm-svn: 47204
2008-02-16 01:24:58 +00:00
Chris Lattner
f8ab0af3c0
upgrade this test, which wasn't testing the right thing since llvm-upgrade came around.
...
llvm-svn: 47194
2008-02-15 23:58:25 +00:00
Chris Lattner
afae31f812
rename llx -> ll
...
llvm-svn: 47192
2008-02-15 23:51:48 +00:00
Evan Cheng
94742fb5d4
This test is not interesting.
...
llvm-svn: 47189
2008-02-15 23:06:21 +00:00
Dale Johannesen
15e608542e
Modify test to expect improved code.
...
llvm-svn: 47182
2008-02-15 22:05:15 +00:00
Duncan Sands
e0330d632a
Fix this test on linux, which returns S242
...
using sret.
llvm-svn: 47173
2008-02-15 19:42:13 +00:00
Devang Patel
01f9252f73
Fix PR2028
...
llvm-svn: 47150
2008-02-15 01:24:49 +00:00
Devang Patel
8af92b942c
If loop header is also loop exiting block then OrigPN is incoming value for B loop header.
...
Fixes PR 2030.
llvm-svn: 47141
2008-02-14 23:18:47 +00:00
Chris Lattner
b8bf200b77
Fix PR2029
...
llvm-svn: 47129
2008-02-14 19:18:13 +00:00
Chris Lattner
9c24f3ec37
Fix a miscompilation from Dan's recent apintification.
...
llvm-svn: 47128
2008-02-14 18:48:56 +00:00
Tanya Lattner
df7da98f55
Remove llvm-upgrade
...
llvm-svn: 47119
2008-02-14 07:57:12 +00:00
Nick Lewycky
12098ea401
Testcase for PR2032.
...
llvm-svn: 47113
2008-02-14 07:15:11 +00:00
Tanya Lattner
f37f44f9ec
Remove llvm-upgrade.
...
llvm-svn: 47110
2008-02-14 06:56:27 +00:00
Chris Lattner
d696c25db5
This readme entry is done, testcase here: CodeGen/X86/zero-remat.ll
...
llvm-svn: 47106
2008-02-14 05:39:46 +00:00
Evan Cheng
cbbcb3144d
Fix test.
...
llvm-svn: 47102
2008-02-14 01:32:53 +00:00
Devang Patel
38de2d11a5
A loop latch phi node may have uses inside loop, not just in loop header.
...
llvm-svn: 47093
2008-02-13 22:23:07 +00:00
Devang Patel
1e71afe2df
While moving exit condition, do not drop loop latch on the floor.
...
llvm-svn: 47089
2008-02-13 22:06:36 +00:00
Devang Patel
d48bbbf07b
Keep track of exit value operand number when operands are swapped.
...
llvm-svn: 47082
2008-02-13 19:48:48 +00:00