Dan Gohman
2a4208c74e
Fold bswap(undef) to undef.
...
llvm-svn: 96432
2010-02-17 00:54:58 +00:00
Dan Gohman
82f46afcdd
Delete some unneeded casts.
...
llvm-svn: 96429
2010-02-17 00:42:19 +00:00
Dan Gohman
493a1fcbe0
Don't attempt to divide INT_MIN by -1; consider such cases to
...
have overflowed.
llvm-svn: 96428
2010-02-17 00:41:53 +00:00
Chris Lattner
9625fb062a
make the new isel's interpreter loop call the generated
...
CheckComplexPattern function. Though it is logically const,
I don't have the fortitude to clean up all the targets now,
and it not being const doesn't block anything.
llvm-svn: 96426
2010-02-17 00:41:34 +00:00
Chris Lattner
fdd452441a
improve comments in generated matcher a bit.
...
llvm-svn: 96422
2010-02-17 00:39:26 +00:00
Dan Gohman
d35c563d80
Make the operand and format specifier match, and print all
...
64 bits, fixing a variety of problems.
llvm-svn: 96421
2010-02-17 00:37:20 +00:00
Chris Lattner
1f818d2e25
make the new isel generator plop out a CheckComplexPattern function
...
for evaluating complex patterns. Some cleanup has to happen before
this can be used though.
llvm-svn: 96419
2010-02-17 00:31:50 +00:00
Bob Wilson
532656cffc
Wrap lines to 80 columns and generally try to clean up whitespace and
...
indentation. No functional changes.
llvm-svn: 96418
2010-02-17 00:31:29 +00:00
Chris Lattner
c87f9d6d1a
roundss is an sse 4 thing, fix the test on non-sse41 builders
...
like llvm-gcc-x86_64-darwin10-selfhost
llvm-svn: 96417
2010-02-17 00:29:06 +00:00
Chris Lattner
ebf80812e3
fix inverted condition.
...
llvm-svn: 96416
2010-02-17 00:11:30 +00:00
Dale Johannesen
d147b9a4d4
Make g5 target explicit; scheduling affects register choice.
...
llvm-svn: 96413
2010-02-16 23:25:23 +00:00
Chris Lattner
3499eaaac1
complex patterns don't get 'record' nodes, they implicitly
...
record all their results.
llvm-svn: 96412
2010-02-16 23:16:25 +00:00
Chris Lattner
c89e98d63b
clean up some code, eliminate NodeIsComplexPattern, which
...
does the same thing as getComplexPatternInfo.
llvm-svn: 96411
2010-02-16 23:13:59 +00:00
Bill Wendling
964b01232c
Make error statement more personal.
...
llvm-svn: 96410
2010-02-16 22:47:14 +00:00
Chris Lattner
617c3a5c69
fix indentation
...
llvm-svn: 96409
2010-02-16 22:38:31 +00:00
Chris Lattner
0d35c68d5c
fix rdar://7653908, a crash on a case where we would fold a load
...
into a roundss intrinsic, producing a cyclic dag. The root cause
of this is badness handling ComplexPattern nodes in the old dagisel
that I noticed through inspection. Eliminate a copy of the of the
code that handled ComplexPatterns by making EmitChildMatchCode call
into EmitMatchCode.
llvm-svn: 96408
2010-02-16 22:35:06 +00:00
Dale Johannesen
60d48aef7b
Adjust register numbers in tests to compensate for the
...
new lack of R2.
llvm-svn: 96407
2010-02-16 22:31:31 +00:00
Chris Lattner
008f62bfa2
filecheckize
...
llvm-svn: 96404
2010-02-16 22:13:43 +00:00
Bob Wilson
ed0eab5843
Handle tGPR register class in a few more places. This fixes some llvm-gcc
...
build failures due to my fix for pr6111.
llvm-svn: 96402
2010-02-16 22:01:59 +00:00
Johnny Chen
7171461638
Add SMC (Secure Monitor Call) system instruction for disassembly only.
...
llvm-svn: 96401
2010-02-16 21:59:54 +00:00
Dale Johannesen
f31a06506f
Really reserve R2 on PPC Darwin. PR 6314.
...
llvm-svn: 96399
2010-02-16 21:53:27 +00:00
Devang Patel
bebe8e55dc
Use line and column number to distinguish two lexical blocks at the same level.
...
llvm-svn: 96395
2010-02-16 21:39:34 +00:00
Jim Grosbach
2acf602672
80 column cleanup
...
llvm-svn: 96393
2010-02-16 21:23:02 +00:00
Devang Patel
1b865d88f9
New testcase.
...
llvm-svn: 96391
2010-02-16 21:16:08 +00:00
Evan Cheng
ee44d6a752
Look for SSE and instructions of this form: (and x, (build_vector c1,c2,c3,c4)).
...
If there exists a use of a build_vector that's the bitwise complement of the mask,
then transform the node to
(and (xor x, (build_vector -1,-1,-1,-1)), (build_vector ~c1,~c2,~c3,~c4)).
Since this transformation is only useful when 1) the given build_vector will
become a load from constpool, and 2) (and (xor x -1), y) matches to a single
instruction, I decided this is appropriate as a x86 specific transformation.
rdar://7323335
llvm-svn: 96389
2010-02-16 21:09:44 +00:00
Jim Grosbach
0c678d7b17
Remove trailing whitespace
...
llvm-svn: 96388
2010-02-16 21:07:46 +00:00
Bob Wilson
86dded571f
Rename SuccessorNumber to GetSuccessorNumber.
...
llvm-svn: 96387
2010-02-16 21:06:42 +00:00
David Greene
c10133139e
Add support for emitting non-temporal stores for DAGs marked
...
non-temporal. Fix from r96241 for botched encoding of MOVNTDQ.
Add documentation for !nontemporal metadata.
Add a simpler movnt testcase.
llvm-svn: 96386
2010-02-16 20:50:18 +00:00
Bob Wilson
7bb549dc8e
Testcase for critical edge splitting with load PRE.
...
llvm-svn: 96385
2010-02-16 20:48:55 +00:00
Jim Grosbach
0c8c072ddf
Update Thumb2 to not use CarryDefIsUnused or CarryDefIsUsed predicates, but
...
to have the predicate on the pattern itself instead. Support for the new
ISel. Remove definitions of CarryDefIsUnused and CarryDefIsUsed since they are
no longer used anywhere.
llvm-svn: 96384
2010-02-16 20:42:29 +00:00
Jim Grosbach
27e3b55717
Remove redundant setting of Defs. CPSR is already marked by the block level set of Defs.
...
llvm-svn: 96383
2010-02-16 20:35:59 +00:00
Dan Gohman
e2da5181db
Refactor rewriting for PHI nodes into a separate function.
...
llvm-svn: 96382
2010-02-16 20:25:07 +00:00
Jim Grosbach
872d6b21aa
First step in eliminating the CarryDefIsUnused and CarryDefIsUsed predicates.
...
They won't work with the new ISel mechanism, as Requires predicates are no
longer allowed to reference the node being selected. Moving the predicate to
the patterns instead solves the problem.
This patch handles ARM mode. Thumb2 will follow.
llvm-svn: 96381
2010-02-16 20:17:57 +00:00
Johnny Chen
900ebc03c5
Added for disassembly the following instructions:
...
o Store Return State (SRSW, SRS)
o Load/Store Coprocessor (LDC/STC and friends)
o MSR (immediate)
llvm-svn: 96380
2010-02-16 20:04:27 +00:00
Bob Wilson
a866c660db
Split critical edges as needed for load PRE.
...
llvm-svn: 96378
2010-02-16 19:51:59 +00:00
Bob Wilson
1115365fcf
Refactor to share code to find the position of a basic block successor in the
...
terminator's list of successors.
llvm-svn: 96377
2010-02-16 19:49:17 +00:00
Dan Gohman
815d966a5a
Fix whitespace.
...
llvm-svn: 96372
2010-02-16 19:42:34 +00:00
Kenneth Uildriks
13195c9525
Function attributes have index ~0, not 0
...
llvm-svn: 96370
2010-02-16 19:28:02 +00:00
Chris Lattner
cafd2c75a1
simplify this code. In the new world order there is no
...
need to scan the entire subtree of the pattern anymore.
llvm-svn: 96369
2010-02-16 19:19:58 +00:00
Chris Lattner
ebcd505b14
convert the new matcher to check intermediate nodes for a single
...
use and only call IsProfitableToFold/IsLegalToFold on the load
being folded, like the old dagiselemitter does. This
substantially simplifies the code and improves opportunities for
sharing.
llvm-svn: 96368
2010-02-16 19:15:55 +00:00
Chris Lattner
eba9f75b00
change dag isel emitter to only call 'IsProfitableToFold' on nodes
...
with chains. On interior nodes that lead up to them, we just directly
check that there is a single use. This generates slightly more
efficient code.
llvm-svn: 96366
2010-02-16 19:03:34 +00:00
Bob Wilson
94eef3fc13
Fix pr6111: Avoid using the LR register for the target address of an indirect
...
branch in ARM v4 code, since it gets clobbered by the return address before
it is used. Instead of adding a new register class containing all the GPRs
except LR, just use the existing tGPR class.
llvm-svn: 96360
2010-02-16 17:24:15 +00:00
Duncan Sands
e9a13a3c60
Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move some
...
methods to try to have the type predicates be more logically positioned.
llvm-svn: 96349
2010-02-16 14:50:09 +00:00
Duncan Sands
1b33dd3c83
There are two ways of checking for a given type, for example isa<PointerType>(T)
...
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.
llvm-svn: 96344
2010-02-16 11:11:14 +00:00
Benjamin Kramer
32ff92be51
Minor warning fixes (semicolons, newline at EOF).
...
llvm-svn: 96343
2010-02-16 10:25:04 +00:00
Chris Lattner
2507e6b51f
mark all the generated node predicates 'const'.
...
llvm-svn: 96337
2010-02-16 07:26:36 +00:00
Chris Lattner
a9550b6d27
generate code for node and pattern predicates. Note that this won't
...
build if enabled, it will fail with constness issues. I'll resolve
these next.
llvm-svn: 96336
2010-02-16 07:21:10 +00:00
Chris Lattner
5a026d7367
refactor some code into a local class.
...
llvm-svn: 96334
2010-02-16 06:52:01 +00:00
Chris Lattner
eb72054cb3
remove now dead code and fixme.
...
llvm-svn: 96333
2010-02-16 06:15:00 +00:00
Chris Lattner
5901090df8
remove dead code. This is never generated for any targets in mainline.
...
llvm-svn: 96332
2010-02-16 06:14:22 +00:00