Akira Hatanaka
2446869410
Detect FI|cst pattern in MipsDAGToDAGISel::SelectAddr. Patch by Sasa Stankovic.
...
llvm-svn: 132448
2011-06-02 01:03:14 +00:00
Akira Hatanaka
d84c76f2a7
Test case for r132444.
...
llvm-svn: 132445
2011-06-02 00:25:53 +00:00
Bruno Cardoso Lopes
98fc4c8bbc
This patch implements atomic intrinsics atomic.load.add (sub,and,or,xor,
...
nand), atomic.swap and atomic.cmp.swap, all in i8, i16 and i32 versions.
The intrinsics are implemented by creating pseudo-instructions, which are
then expanded in the method MipsTargetLowering::EmitInstrWithCustomInserter.
Patch by Sasa Stankovic.
llvm-svn: 132323
2011-05-31 02:54:07 +00:00
Bruno Cardoso Lopes
bf3c1251e0
This patch implements the thread local storage. Implemented are General
...
Dynamic, Initial Exec and Local Exec TLS models.
Patch by Sasa Stankovic
llvm-svn: 132322
2011-05-31 02:53:58 +00:00
Jakob Stoklund Olesen
dd6fcc4e46
Fix PR10046 by updating LiveVariables kill info when splitting live ranges.
...
This only affects targets like Mips where branch instructions may kill virtual
registers. Most other targets branch on flag values, so virtual registers are
not involved.
The problem is that MachineBasicBlock::updateTerminator deletes branches and
inserts new ones while LiveVariables keeps a list of pointers to instructions
that kill virtual registers. That list wasn't properly updated in
MBB::SplitCriticalEdge.
llvm-svn: 132298
2011-05-29 20:10:28 +00:00
Akira Hatanaka
b406843fe5
Define a wrapper node for target constant nodes (tglobaladdr, etc.).
...
Need this to prevent emitting illegal conditional move instructions.
llvm-svn: 132240
2011-05-28 01:07:07 +00:00
Akira Hatanaka
aa560006ed
Add support for C++ exception handling.
...
llvm-svn: 132131
2011-05-26 18:59:03 +00:00
Akira Hatanaka
fa63d3096d
Define WeakRefDirective.
...
llvm-svn: 132098
2011-05-25 23:30:30 +00:00
Akira Hatanaka
44eba3ac49
Custom-lower FCOPYSIGN nodes.
...
llvm-svn: 132074
2011-05-25 19:32:07 +00:00
Akira Hatanaka
aac670c1c8
Fix lowering of DYNAMIC_STACKALLOC nodes.
...
llvm-svn: 132030
2011-05-25 02:20:00 +00:00
Akira Hatanaka
2486729839
Test case for r132003.
...
llvm-svn: 132005
2011-05-24 21:28:18 +00:00
Akira Hatanaka
ce4037ebcf
Fix test case.
...
llvm-svn: 131988
2011-05-24 19:37:15 +00:00
Akira Hatanaka
0f30561bae
Revision 131986 test case.
...
llvm-svn: 131987
2011-05-24 19:29:37 +00:00
Akira Hatanaka
6af5bd2537
Add pattern for double-to-integer conversion. Patch by Sasa Stankovic.
...
llvm-svn: 131927
2011-05-23 22:16:43 +00:00
Akira Hatanaka
f9e5750fc8
Change StackDirection from StackGrowsUp to StackGrowsDown.
...
The following improvements are accomplished as a result of applying this patch:
- Fixed frame objects' offsets (relative to either the virtual frame pointer or
the stack pointer) are set before instruction selection is completed. There is
no need to wait until Prologue/Epilogue Insertion is run to set them.
- Calculation of final offsets of fixed frame objects is straightforward. It is
no longer necessary to assign negative offsets to fixed objects for incoming
arguments in order to distinguish them from the others.
- Since a fixed object has its relative offset set during instruction
selection, there is no need to conservatively set its alignment to 4.
- It is no longer necessary to reorder non-fixed frame objects in
MipsFrameLowering::adjustMipsStackFrame.
llvm-svn: 131915
2011-05-23 20:16:59 +00:00
Akira Hatanaka
43407fe633
Make $fp and $ra callee-saved registers and let PrologEpilogInserter handle
...
saving and restoring them.
llvm-svn: 131745
2011-05-20 18:39:33 +00:00
Akira Hatanaka
fe4f9d5977
Fix bug in which nodes that write to argument registers do not get glued with the JALR node. Patch by Sasa Stankovic
...
llvm-svn: 131714
2011-05-20 02:30:51 +00:00
Akira Hatanaka
9e6a8cca5d
Align i64 arguments to 64 bit boundaries.
...
llvm-svn: 131668
2011-05-19 20:29:48 +00:00
Akira Hatanaka
3bace5d223
Remove LLVM IR metadata in test case committed in r130847.
...
llvm-svn: 130849
2011-05-04 18:28:36 +00:00
Akira Hatanaka
23e8ecf125
Prevent instructions using $gp from being placed between a jalr and the instruction that restores the clobbered $gp.
...
llvm-svn: 130847
2011-05-04 17:54:27 +00:00
Jakob Stoklund Olesen
5b5abb4ea1
Don't run this test through -regalloc=basic.
...
The basic allocator is really bad about hinting, so it doesn't eliminate all
copies when physreg joining is disabled.
llvm-svn: 130817
2011-05-04 01:01:44 +00:00
Akira Hatanaka
0e7ee666b7
Lower BlockAddress node when relocation-model is static.
...
llvm-svn: 130131
2011-04-25 17:10:45 +00:00
Jakob Stoklund Olesen
bf78618db6
Make tests register allocation independent again.
...
llvm-svn: 129739
2011-04-19 00:14:43 +00:00
Akira Hatanaka
2cb3aa30dd
Re-enable test o32_cc_vararg.ll.
...
llvm-svn: 129616
2011-04-15 22:23:09 +00:00
Akira Hatanaka
279169771b
Add pass that expands pseudo instructions into target instructions after register allocation. Define pseudos that get expanded into mtc1 or mfc1 instructions.
...
llvm-svn: 129594
2011-04-15 19:52:08 +00:00
Andrew Trick
b53a00d2cb
Recommit r129383. PreRA scheduler heuristic fixes: VRegCycle, TokenFactor latency.
...
Additional fixes:
Do something reasonable for subtargets with generic
itineraries by handle node latency the same as for an empty
itinerary. Now nodes default to unit latency unless an itinerary
explicitly specifies a zero cycle stage or it is a TokenFactor chain.
Original fixes:
UnitsSharePred was a source of randomness in the scheduler: node
priority depended on the queue data structure. I rewrote the recent
VRegCycle heuristics to completely replace the old heuristic without
any randomness. To make the ndoe latency adjustments work, I also
needed to do something a little more reasonable with TokenFactor. I
gave it zero latency to its consumers and always schedule it as low as
possible.
llvm-svn: 129421
2011-04-13 00:38:32 +00:00
Akira Hatanaka
d6f1c58914
Fix handling of functions with internal linkage.
...
llvm-svn: 129099
2011-04-07 19:51:44 +00:00
Jakob Stoklund Olesen
1ec41e2bd9
These tests no longer require linear scan because reserved register coalescing is now universal.
...
llvm-svn: 128936
2011-04-05 21:40:41 +00:00
Akira Hatanaka
93f898f643
Add code for analyzing FP branches. Clean up branch Analysis functions.
...
llvm-svn: 128718
2011-04-01 17:39:08 +00:00
Jakob Stoklund Olesen
f4c9754d5c
Fix Mips, Sparc, and XCore tests that were dependent on register allocation.
...
Add an extra run with -regalloc=basic to keep them honest.
llvm-svn: 128654
2011-03-31 18:42:43 +00:00
Akira Hatanaka
a535270d91
Added support for FP conditional move instructions and fixed bugs in handling of FP comparisons.
...
llvm-svn: 128650
2011-03-31 18:26:17 +00:00
Daniel Dunbar
66559ba79a
Revert "Re-enable test and hope to silence the buildbots", still broken.
...
llvm-svn: 127369
2011-03-09 22:48:46 +00:00
Bruno Cardoso Lopes
6492ef1237
Add a testcase for the addc improvements introduced some commits ago. Patch by Akira Hatanaka
...
llvm-svn: 127358
2011-03-09 21:05:32 +00:00
Bruno Cardoso Lopes
961908982f
Re-enable test and hope to silence the buildbots
...
llvm-svn: 127357
2011-03-09 21:00:16 +00:00
Bruno Cardoso Lopes
bd2f81c87b
try to make o32 cc tests less specific to silence some buildbots. The test isn't enabled yet, this is will be done in a subsequent commit. Patch by Akira Hatanaka.
...
llvm-svn: 127356
2011-03-09 20:59:05 +00:00
Bruno Cardoso Lopes
048ffabe78
Improve varags handling, with testcases. Patch by Sasa Stankovic
...
llvm-svn: 127349
2011-03-09 19:22:22 +00:00
Bruno Cardoso Lopes
434248a62c
Improve div/rem node handling on mips. Patch by Akira Hatanaka
...
llvm-svn: 127034
2011-03-04 21:03:24 +00:00
Bruno Cardoso Lopes
d631599e38
Add testcase for r127032
...
llvm-svn: 127033
2011-03-04 20:48:39 +00:00
Joerg Sonnenberger
62f759791a
Be nice to Xcore and the XMOS assembler and avoid quoting section names
...
that contain only letters, digits and the characters "_" and ".".
llvm-svn: 127028
2011-03-04 20:03:14 +00:00
Bruno Cardoso Lopes
f8198e4311
Lowers block address. Currently asserts when relocation model is not PIC. Patch by Akira Hatanaka
...
llvm-svn: 127027
2011-03-04 20:01:52 +00:00
Joerg Sonnenberger
852ab890b5
Bug#9033: For the ELF assembler output, always quote the section name.
...
llvm-svn: 126963
2011-03-03 22:31:08 +00:00
Daniel Dunbar
4be2ab4894
Disable this test for now...
...
llvm-svn: 125361
2011-02-11 02:59:08 +00:00
Bruno Cardoso Lopes
6e4b229c02
Add mips o32 tests again with the hope that the buildbot won't complaint again
...
llvm-svn: 125316
2011-02-10 23:37:20 +00:00
Bruno Cardoso Lopes
788afe6d3a
Remove the test to silence the buildbot, will check it in again with a proper fix soon
...
llvm-svn: 125305
2011-02-10 20:10:17 +00:00
Bruno Cardoso Lopes
61a61e9da3
Fix a lot of o32 CC issues and add a bunch of tests. Patch by Akira Hatanaka with some small modifications by me.
...
llvm-svn: 125292
2011-02-10 18:05:10 +00:00
Bruno Cardoso Lopes
4dc73fa075
Add support for mips32 madd and msub instructions. Patch by Akira Hatanaka
...
llvm-svn: 123760
2011-01-18 19:29:17 +00:00
Rafael Espindola
ec517cdf24
Update tests.
...
llvm-svn: 123591
2011-01-16 18:02:57 +00:00
Bruno Cardoso Lopes
d47180e45e
Add ROTR and ROTRV mips32 instructions. Patch by Akira Hatanaka
...
llvm-svn: 121377
2010-12-09 17:32:30 +00:00
Bruno Cardoso Lopes
f0c6e3780d
Match a pattern generated by a dag combiner opt where:
...
(select (load (load tga0)) (load tga1)) => (load (select (load tga0) tga1))
Thanks to Akira for pointing that.
llvm-svn: 121163
2010-12-07 19:00:20 +00:00
Devang Patel
c24048a718
If dbg_declare() or dbg_value() is not lowered by isel then emit DEBUG message instead of creating DBG_VALUE for undefined value in reg0.
...
llvm-svn: 121059
2010-12-06 22:39:26 +00:00
Bruno Cardoso Lopes
03c0330176
Enable mips32 mul instruction. Patch by Akira Hatanaka <ahatanaka@mips.com>
...
llvm-svn: 118864
2010-11-12 00:38:32 +00:00
Bruno Cardoso Lopes
a4ceea8cd8
Add a test to the previous added clo instruction. Patch by Akira again
...
llvm-svn: 118668
2010-11-10 02:22:44 +00:00
Evan Cheng
f3e9a48584
Enable machine sinking critical edge splitting. e.g.
...
define double @foo(double %x, double %y, i1 %c) nounwind {
%a = fdiv double %x, 3.2
%z = select i1 %c, double %a, double %y
ret double %z
}
Was:
_foo:
divsd LCPI0_0(%rip), %xmm0
testb $1, %dil
jne LBB0_2
movaps %xmm1, %xmm0
LBB0_2:
ret
Now:
_foo:
testb $1, %dil
je LBB0_2
divsd LCPI0_0(%rip), %xmm0
ret
LBB0_2:
movaps %xmm1, %xmm0
ret
This avoids the divsd when early exit is taken.
rdar://8454886
llvm-svn: 114372
2010-09-20 22:52:00 +00:00
Duncan Sands
68c30907cc
Correct bogus module triple specifications.
...
llvm-svn: 112469
2010-08-30 10:48:29 +00:00
Bruno Cardoso Lopes
160695fecb
Fix PR7174, a couple o Mips fixes:
...
- Fix a typo for PIC check during jmp table lowering
- Also fix the "first jump table basic block is not
considered only reachable by fall through" problem, use this
ad-hoc solution until I come up with something better.
Patch by stetorvs@gmail.com
llvm-svn: 108820
2010-07-20 08:37:04 +00:00
Bruno Cardoso Lopes
ea7863647b
Fix Mips PR7473. Patch by stetorvs@gmail.com
...
llvm-svn: 108816
2010-07-20 07:58:51 +00:00
Dan Gohman
4fee6f3bdd
Start function numbering at 0.
...
llvm-svn: 101638
2010-04-17 16:29:15 +00:00
Dale Johannesen
f118f9788b
Split big test into multiple directories to cater to
...
those who don't build all targets.
llvm-svn: 100688
2010-04-07 20:43:35 +00:00
Dan Gohman
fb4193625a
Delete useless trailing semicolons.
...
llvm-svn: 92740
2010-01-05 17:55:26 +00:00
Bruno Cardoso Lopes
2db07581b7
Support PIC loading of constant pool entries
...
llvm-svn: 89863
2009-11-25 12:17:58 +00:00
Daniel Dunbar
0b2099ad5f
Unbreak test, Bruno please check.
...
llvm-svn: 89329
2009-11-19 07:18:49 +00:00
Bruno Cardoso Lopes
4713b282ce
- Add sugregister logic to handle f64=(f32,f32).
...
- Support mips1 like load/store of doubles:
Instead of:
sdc $f0, X($3)
Generate:
swc $f0, X($3)
swc $f1, X+4($3)
llvm-svn: 89322
2009-11-19 06:06:13 +00:00
Evan Cheng
8ca5d4b9ad
xfail for now. It has been failing.
...
llvm-svn: 88892
2009-11-16 05:44:04 +00:00
Bruno Cardoso Lopes
537e409c58
- Fix a small bug while handling target constant pools (one param was missing).
...
- Add a smarter constant pool loading, instead of:
lui $2, %hi($CPI1_0)
addiu $2, $2, %lo($CPI1_0)
lwc1 $f0, 0($2)
Generate:
lui $2, %hi($CPI1_0)
lwc1 $f0, %lo($CPI1_0)($2)
llvm-svn: 88886
2009-11-16 04:33:42 +00:00
Dan Gohman
c8054d90fb
Eliminate more uses of llvm-as and llvm-dis.
...
llvm-svn: 81293
2009-09-09 00:09:15 +00:00
Dan Gohman
0d4bbf2c4a
Remove obsolete -f flags.
...
llvm-svn: 79992
2009-08-25 15:38:29 +00:00
Chris Lattner
68535f7603
reintroduce support for Mips "small" section handling. This is
...
implemented somewhat differently than before, but it should have
the same functionality and the previous testcase passes again.
llvm-svn: 78900
2009-08-13 06:28:06 +00:00
Daniel Dunbar
0f16ea5c30
Pass target triple string in to TargetMachine constructor.
...
This is not just a matter of passing in the target triple from the module;
currently backends are making decisions based on the build and host
architecture. The goal is to migrate to making these decisions based off of the
triple (in conjunction with the feature string). Thus most clients pass in the
target triple, or the host triple if that is empty.
This has one important change in the way behavior of the JIT and llc.
For the JIT, it was previously selecting the Target based on the host
(naturally), but it was setting the target machine features based on the triple
from the module. Now it is setting the target machine features based on the
triple of the host.
For LLC, -march was previously only used to select the target, the target
machine features were initialized from the module's triple (which may have been
empty). Now the target triple is taken from the module, or the host's triple is
used if that is empty. Then the triple is adjusted to match -march.
The take away is that -march for llc is now used in conjunction with the host
triple to initialize the subtarget. If users want more deterministic behavior
from llc, they should use -mtriple, or set the triple in the input module.
llvm-svn: 77946
2009-08-03 04:03:51 +00:00
Chris Lattner
26aff56462
Remove SectionKind::Small*. This was only used on mips, and is apparently
...
a sad mistake that is regretted. :)
llvm-svn: 76935
2009-07-24 03:11:51 +00:00
Duncan Sands
0cf7f5d6d2
Revert commit 76707, it was breaking the llvm-gcc build
...
on linux platforms. The binutils assembler does not
recognize the "s" flag, see for example
http://sourceware.org/binutils/docs/as/Section.html
llvm-svn: 76733
2009-07-22 10:35:05 +00:00
Chris Lattner
8ebaec6b27
set the ELF "small" flag on objects that end up in .rodata.cst4 consistently,
...
updating a mips testcase to expect it.
llvm-svn: 76707
2009-07-22 00:41:56 +00:00
Dan Gohman
a5b9645c4b
Split the Add, Sub, and Mul instruction opcodes into separate
...
integer and floating-point opcodes, introducing
FAdd, FSub, and FMul.
For now, the AsmParser, BitcodeReader, and IRBuilder all preserve
backwards compatability, and the Core LLVM APIs preserve backwards
compatibility for IR producers. Most front-ends won't need to change
immediately.
This implements the first step of the plan outlined here:
http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt
llvm-svn: 72897
2009-06-04 22:49:04 +00:00
Bill Wendling
0a9ea80013
This looks like it passes now.
...
llvm-svn: 72485
2009-05-27 17:43:21 +00:00
Rafael Espindola
6de96a1b5d
Add the private linkage.
...
llvm-svn: 62279
2009-01-15 20:18:42 +00:00
Dan Gohman
1407484178
The list-td and list-tdrr schedulers don't yet support physreg
...
scheduling dependencies. Add assertion checks to help catch
this.
It appears the Mips target defaults to list-td, and it has a
regression test that uses a physreg dependence. Such code was
liable to be miscompiled, and now evokes an assertion failure.
llvm-svn: 62177
2009-01-13 20:24:13 +00:00
Duncan Sands
ddacbb39ab
Fix PR2667: add soft float support for sint_to_fp/uint_to_fp
...
where the argument is an apint, or smaller than the minimum
size for which there is a libcall (i32).
llvm-svn: 58994
2008-11-10 17:36:26 +00:00
Duncan Sands
8475d56794
Turn on LegalizeTypes, the new type legalization
...
codegen infrastructure, by default. Please report
any breakage to the mailing lists.
llvm-svn: 58232
2008-10-27 08:42:46 +00:00
Evan Cheng
da9b752883
FIX PR2794. Make sure SIGN_EXTEND_INREG nodes introduced by LegalizeSetCCOperands are leglized. Patch by Richard Pennington.
...
llvm-svn: 57460
2008-10-13 18:46:18 +00:00
Bruno Cardoso Lopes
595229a15a
Added testcase for bswap allegrexel intrinsic
...
llvm-svn: 56225
2008-09-15 19:38:11 +00:00
Bruno Cardoso Lopes
93da7e6924
Support added for ctlz intrinsic, test case added.
...
llvm-svn: 54516
2008-08-08 06:16:31 +00:00
Bruno Cardoso Lopes
6067b44985
[Last] Batch 7 of Mips CodeGen tests
...
llvm-svn: 54512
2008-08-08 04:12:42 +00:00
Bruno Cardoso Lopes
b60eebbab8
Batch 6 of Mips CodeGen tests
...
llvm-svn: 54511
2008-08-08 04:11:30 +00:00
Bruno Cardoso Lopes
9c8b9d4606
Batch 5 of Mips CodeGen tests
...
llvm-svn: 54510
2008-08-08 04:09:57 +00:00
Bruno Cardoso Lopes
32d4b5a44e
Batch 4 of Mips CodeGen tests
...
llvm-svn: 54509
2008-08-08 04:08:30 +00:00
Bruno Cardoso Lopes
118a9e4813
Batch 3 of Mips CodeGen tests
...
llvm-svn: 54508
2008-08-08 04:05:51 +00:00
Bruno Cardoso Lopes
6b9077a5e4
Batch 2 of Mips CodeGen tests
...
llvm-svn: 54507
2008-08-08 04:03:25 +00:00
Bruno Cardoso Lopes
98ab9b334b
Batch 1 of Mips CodeGen tests, more coming...
...
I had a lot of simple local codegen tests and they are now ready to be placed
in test/CodeGen.
llvm-svn: 54506
2008-08-08 03:58:34 +00:00