Commit Graph

24193 Commits

Author SHA1 Message Date
Dan Gohman
d0859943ac Add an assert to catch invalid VECTOR_SHUFFLE mask indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54329 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-04 23:09:15 +00:00
Bruno Cardoso Lopes
f7f3b50cd8 Mips ISelLowering cleanup : Removed old LowerCALL and FORMAL_ARGS helpers, they
aren't used anyway, they also used to broke compiling when fastcc was specified for a
function, but not anymore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54316 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-04 07:12:52 +00:00
Bruno Cardoso Lopes
ea9d4d6ab0 Handle i32->f32 bitconvert results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54315 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-04 06:44:31 +00:00
Andrew Lenharth
08ca62bb6f Add atomic sub for other sizes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54314 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-03 20:17:34 +00:00
Chris Lattner
e594fd473e Emit saveri with the correct operand order, patch by Richard Pennington!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54313 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-03 18:16:14 +00:00
Bruno Cardoso Lopes
64cf160fef Fix PR2615
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54312 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-03 15:37:43 +00:00
Bruno Cardoso Lopes
91ef849e6c Improved asm inline for hi,lo results
Added hi,lo registers to be used,def implicitly. This provides better handle of
instructions which use hi/lo.
Fixes a small BranchAnalysis bug


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54274 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-02 19:42:36 +00:00
Bruno Cardoso Lopes
1906c5a63b Apply the same pattern used in 'and' lowering for 'or'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54273 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-02 19:37:33 +00:00
Duncan Sands
58921feaa9 Fix comment typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54266 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-01 12:23:49 +00:00
Bruno Cardoso Lopes
7bd7182e21 Expand fcopysign
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54250 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-31 18:50:54 +00:00
Bruno Cardoso Lopes
772837778b Handle more SELECT corner cases considering legalize types, probabily wont work with
the default legalizer.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54249 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-31 18:31:28 +00:00
Dale Johannesen
7232464bda Add a flag to disable jump table generation (all
switches use the binary search algorithm) for
environments that don't support it.  PPC64 JIT
is such an environment; turn the flag on for that.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54248 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-31 18:13:12 +00:00
Dan Gohman
75dcf08243 Improve dagcombining for sext-loads and sext-in-reg nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54239 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-31 00:50:31 +00:00
Bruno Cardoso Lopes
7030ae7728 Added pattern for floating point zero immediate (avoiding a constant pool
access).
Added pattern to match bitconvert node.
Fixed MTC1 asm string bug.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54229 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-30 19:00:31 +00:00
Dan Gohman
0b12aef490 Move SelectionDAG::viewGraph() out of line; as an inline function
it isn't always visible to gdb.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54228 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-30 18:48:53 +00:00
Dan Gohman
90d33ee746 Don't look for leaf values to store when lowering stores of
empty structs. This fixes PR2612.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54226 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-30 18:36:51 +00:00
Owen Anderson
d723f722b2 Use existing LiveInterval methods to simplify live interval merging. Thanks to Evan for pointing these out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54225 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-30 18:27:35 +00:00
Dan Gohman
11ba3b1af6 Reapply r54147 with a constraint to only use the 8-bit
subreg form on x86-64, to avoid the problem with x86-32
having GPRs that don't have 8-bit subregs.

Also, change several 16-bit instructions to use 
equivalent 32-bit instructions. These have a smaller
encoding and avoid partial-register updates.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54223 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-30 18:09:17 +00:00
Owen Anderson
912923925f Value numbers whose def index is a special sentinel value should not be remapped.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54218 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-30 17:42:47 +00:00
Bruno Cardoso Lopes
4b877ca1c5 Fixed bug in global address lowering for functions and in Brcond lowering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54215 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-30 17:06:13 +00:00
Bruno Cardoso Lopes
ea7930e618 Removed small section flag for mips, the assembler doesnt support this flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54214 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-30 17:04:04 +00:00
Bruno Cardoso Lopes
d3a680dda5 Added new features to represent specific instructions groups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54213 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-30 17:01:06 +00:00
Bruno Cardoso Lopes
f7d66f7345 Instruction definition cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54212 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-30 16:58:59 +00:00
Mon P Wang
e3b3a7241c Added support for overloading intrinsics (atomics) based on pointers
to different address spaces.  This alters the naming scheme for those
intrinsics, e.g., atomic.load.add.i32 => atomic.load.add.i32.p0i32


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54195 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-30 04:36:53 +00:00
Eli Friedman
1fbffe0cef Another SCEV issue from PR2607; essentially the same issue, but this
time applying to the implicit comparison in smin expressions. The 
correct way to transform an inequality into the opposite 
inequality, either signed or unsigned, is with a not expression.

I looked through the SCEV code, and I don't think there are any more 
occurrences of this issue.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54194 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-30 04:36:32 +00:00
Owen Anderson
9382b9310f More fixes for corner cases when remapping live range indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54186 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-30 00:22:56 +00:00
Owen Anderson
b9fb8d1e69 When merging live intervals, we also need to merge in any live ranges that are inputs to two-address instructions
that themselves define a range we already care about.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54185 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-30 00:21:16 +00:00
Eli Friedman
068acc3caa Fix for PR2607: SCEV miscomputing the loop count for loops with an
SGT exit condition.  Essentially, the correct way to flip an inequality 
in 2's complement is the not operator, not the negation operator.  
That said, the difference only affects cases involving INT_MIN.

Also, enhance the pre-test search logic to be a bit smarter about 
inequalities flipped with a not operator, so it can eliminate the smax 
from the iteration count for simple loops.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54184 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-30 00:04:08 +00:00
Owen Anderson
83ea1f8e19 When merging a PHI operand's live interval into the PHI's live interval, we need to merge over all liveranges in
the operand's interval that share the relevant value number, not just the range that immediately precedes the PHI.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54174 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 21:17:08 +00:00
Owen Anderson
a0c032f9b2 Don't decrement the BB remap when we don't need to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54173 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 21:15:44 +00:00
Duncan Sands
68d4d1d49c Fix PR2609. If a label is deleted, then it needs
to be marked invalid regardless of whether it is
a debug, an exception handling or (hopefully) a
GC label.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54172 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 20:56:02 +00:00
Bruno Cardoso Lopes
97843cdb0b Changed some methods order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54169 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 19:29:50 +00:00
Nate Begeman
24dc346a16 Fix broken CellSPU lowering, re-instate braces in Legalize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54168 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 19:07:27 +00:00
Bruno Cardoso Lopes
6d399bdea2 Added floating point lowering for select.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54167 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 19:05:28 +00:00
Nate Begeman
f09d131126 Disable a fix in the previous patch, since it breaks CellSPU.
The CellSPU codegen is broken, but needs to be fixed before we can
put this back in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54164 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 18:28:31 +00:00
Nate Begeman
5bc1ea0736 Add vector shifts to the IR, patch by Eli Friedman.
CodeGen & Clang work coming next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54161 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 15:49:41 +00:00
Matthijs Kooijman
75cf9cc527 Add -unroll-allow-partial command line option that enabled the loop unroller to
partially unroll a loop when fully unrolling would not fit under the threshold.

Patch by Mikael Lepistö.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54160 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 13:21:23 +00:00
Matthijs Kooijman
477f5a2f11 Restructure ArgumentPromotion a bit. Instead of just having a single boolean
that says "unconditional loads from this argument are safe", we now keep track
of the safety per set of indices from which loads happen. This prevents
ArgPromotion from promoting loads that aren't really valid. As an added effect,
this will now disregard the the type of the indices passed to a GEP, so
"load GEP %A, i32 1" and "load GEP %A, i64 1" will result in a single argument,
not two.

This fixes PR2598, for which a testcase has been added as well.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54159 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 10:00:13 +00:00
Matthijs Kooijman
e2afdedec5 Add a GetElementPtrInst::getIndexedType that accepts uint64_t's instead of just Value*'s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54157 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 08:46:11 +00:00
Evan Cheng
60b75f462e Fix for PR2578. Do not split off a block whose size is less than FreeRangeHeader::getMinBlockSize(). Patch by Damien.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54152 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 07:38:32 +00:00
Dan Gohman
7ba145b0b4 Revert 54147.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54148 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 01:02:18 +00:00
Dan Gohman
b1e8cad61e Add x86 isel patterns to match what would be a ZERO_EXTEND_INREG operation,
which is represented in codegen as an 'and' operation. This matches them
with movz instructions, instead of leaving them to be matched by and
instructions with an immediate field.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54147 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-28 22:18:25 +00:00
Dan Gohman
fed90b6d09 Fold the useful features of alist and alist_node into ilist, and
a new ilist_node class, and remove them. Unlike alist_node,
ilist_node doesn't attempt to manage storage itself, so it avoids
the associated problems, including being opaque in gdb.

Adjust the Recycler class so that it doesn't depend on alist_node.
Also, change it to use explicit Size and Align parameters, allowing
it to work when the largest-sized node doesn't have the greatest
alignment requirement.

Change MachineInstr's MachineMemOperand list from a pool-backed
alist to a std::list for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54146 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-28 21:51:04 +00:00
Owen Anderson
80e051dfde Don't remove volatile loads. Thanks to Duncan for noticing this one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54144 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-28 20:52:42 +00:00
Bruno Cardoso Lopes
f33bc43c9a Disable gp_rel relocation for constant pools access for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54142 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-28 19:26:25 +00:00
Duncan Sands
53388fcde6 Since build_vector is a variadic node, the number
of operands should be -1 not 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54141 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-28 19:17:21 +00:00
Bruno Cardoso Lopes
85e31e3a53 Added floating point lowering for setcc and brcond.
Fixed COMM asm directive usage.
ConstantPool using custom FourByteConstantSection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54139 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-28 19:11:24 +00:00
Dan Gohman
0471a79f20 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54136 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-28 18:43:51 +00:00
Owen Anderson
8aa895b19a Add support for eliminating stores that store the same value that was just loaded.
This fixes PR2599.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54133 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-28 16:14:26 +00:00
Owen Anderson
d4310a5d41 Fix a subtle bug when removing instructions from memdep. In very specific
circumstances we could end up remapping a dependee to the same instruction 
that we're trying to remove.  Handle this properly by just falling back to
a conservative solution.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54132 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-28 16:00:58 +00:00