Commit Graph

72679 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
6205769741 Delete a test that is no longer relevant.
According to PR2536, the old spiller had trouble with the IMPLICIT_DEF in this
code:

  %reg1028<def> = MOV16rm %reg0, 1, %reg0, <ga:g_5>, Mem:LD(2,2) [g_5 + 0]
  %reg1039<def> = IMPLICIT_DEF
  %reg1038<def> = INSERT_SUBREG %reg1039, %reg1028, 2
  %reg1025<def> = AND32ri %reg1038, 65534, %%EFLAGS<imp-def>

However, today we emit a zero-extending load instead:

  %vreg10<def> = MOVZX32rm16 %noreg, 1, %noreg, <ga:@g_5>, %noreg; %mem:LD2[@g_5] GR32:%vreg10
  %vreg0<def> = AND32ri %vreg10, 65534, %%EFLAGS<imp-def,dead>; %GR32:%vreg0,%vreg10

This makes the test pointless since it no longer creates the spiller hazard.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132210 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 20:02:42 +00:00
Chad Rosier
4591193b8d CRC32 intrinsics were renamed at revision 132163. This submission
fixes aliasing issues with the old and new names as well as adds test
cases for the auto-upgrader.
Fixes rdar 9472944.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132207 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 19:38:10 +00:00
Devang Patel
045c1d4e48 Keep this simple. Use DIType to get signness and size of a type. Based on size, select appropraite form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132206 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 19:13:26 +00:00
Charles Davis
7b06b7357a Add a parameter to the Win64 EH section getters to get a section with a
suffix (e.g. .xdata$myfunc). The suffix part isn't implemented yet, but
I'll get to it in the next patch.

Fix up all callers of the affected functions. Make them pass said suffix to
the function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132205 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 19:09:24 +00:00
Evan Cheng
d3444ff532 Add iOS test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132203 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 19:04:21 +00:00
Dan Gohman
cc1ffc6652 Update this comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132202 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 18:42:33 +00:00
Eli Friedman
30a121b4e8 Don't sink or hoist debug info instrinsics; it isn't useful. This also prevents LICM sinking from erasing debug intrinsics which don't dominate any exit block of the loop.
rdar://9143943 .



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132201 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 18:37:52 +00:00
John McCall
a3de16bc8f Fix the inliner to maintain the current de facto invoke semantics:
- the selector for the landing pad must provide all available information
    about the handlers, filters, and cleanups within that landing pad
  - calls to _Unwind_Resume must be converted to branches to the enclosing
    lpad so as to avoid re-entering the unwinder when the lpad claimed it
    was going to handle the exception in some way
This is quite specific to libUnwind-based unwinding.  In an effort to not
interfere too badly with other unwinders, and with existing hacks in frontends,
this only triggers on _Unwind_Resume (not _Unwind_Resume_or_Rethrow) and does
nothing with selectors if it cannot find a selector call for either lpad.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132200 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 18:34:38 +00:00
Jakob Stoklund Olesen
11f6cc96bf Delete MethodBodies that only filtered reserved registers.
The register allocators know to filter reserved registers from the allocation
orders, so we don't need all of this boilerplate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132199 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 18:27:13 +00:00
Devang Patel
72f0d9cdef Handle signed types gracefully.
This fixes regressions reported by buildbots as a fallout of r132193.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132197 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 18:15:52 +00:00
Eli Friedman
45c4c4f257 And fix the test in r132194.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132196 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 18:14:28 +00:00
Eli Friedman
c955d212a8 Oops, wasn't intending to commit this. Partial revert of r132194.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132195 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 18:04:04 +00:00
Eli Friedman
a4d487fc1e Fix a silly mistake (which trips over an assertion) in r132099. rdar://9515076
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132194 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 18:02:04 +00:00
Devang Patel
b58128e2b2 Select DW_AT_const_value size based on variable size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132193 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 16:45:18 +00:00
Rafael Espindola
25b15d8502 Remove DwarfRegNum from the individual bits of the condition register.
These should be DW_OP_bit_piece of CR (64).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132192 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 16:15:27 +00:00
Rafael Espindola
81a2745830 Remove DwarfRegNum from CARRY. I should be encoded with DW_OP_bit_piece.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132190 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 16:01:08 +00:00
Charles Davis
07cbe23173 Assorted fixes for Win64 EH unwind info emission:
- Flip order of bitfields. This gets our output matching GAS.
- Handle case where the end of the prolog wasn't specified.
- If the resulting unwind info struct is less than 8 bytes, pad to 8 bytes.

Add a test for the latter two.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132188 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 15:10:25 +00:00
Rafael Espindola
81e193cc1f Remove dwarf numbers from subregs. We should use DW_OP_bit_piece to
refer to them.

I tested this with both check-all and the gdb testsuite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132187 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 15:08:24 +00:00
Benjamin Kramer
17c1bb5d55 InstCombine: Make switch folding with equality compares more aggressive by trying instsimplify on the arm where we know the compared value.
Stuff like "x == y ? y : x&y" now folds into "x&y".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132185 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 13:00:16 +00:00
Cameron Zwarich
f031d0977f Fix PR10029 - VerifyCoalescing failure on patterns_dfa.c of 445.gobmk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132181 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 05:04:51 +00:00
Charles Davis
3a5d7d0665 Add a test for Win64 EH unwind information emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132180 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 03:54:43 +00:00
Eric Christopher
33281b2361 Make the branch encoding for tBcc more obvious that it's a 4-byte opcode
followed by a conditional and imm8.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132179 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 03:50:53 +00:00
Eric Christopher
86bbcbf4b0 Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132178 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 03:46:51 +00:00
Charles Davis
c4cbf9b6aa Start keeping track of where the various unwind instructions are in the prolog.
Use them to calculate the offset inside the prolog. Emit this value when
emitting the unwind codes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132177 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 03:25:01 +00:00
Charles Davis
ef60724ddc Add missing break statements. Align UNWIND_INFO and RUNTIME_FUNCTION structs
to 4 bytes.

I'm surprised no one caught the missing break statements.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132176 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 02:43:19 +00:00
Charles Davis
4eeb7b662b My attempt at fixing the leak reported by the valgrind buildbots. Valgrind will
still report leaks, but they're spurious now. Valgrind cannot peer into
std::vector objects--or any dynamic array, for that matter--because it doesn't
know how big the array is.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132174 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 02:01:08 +00:00
Charles Davis
c2d3022aa6 Fix inverted conditional in SaveReg and SaveXMM. Err when the frame pointer is
already defined, and err when the PushMachFrame operation isn't the first
operation (if specified at all).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132173 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 01:42:17 +00:00
Eli Friedman
1a24bf0cf9 One more debug line number miss in instcombine (although the code in question isn't actually in instcombine).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132170 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 01:00:36 +00:00
Dan Gohman
08b280b0fe Fix copy+pastos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132168 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 00:36:31 +00:00
Eli Friedman
a311c34d2a Final step of instcombine debuginfo; switch a couple more places over to InsertNewInstWith, and use setDebugLoc for the cases which can't be easily handled by the automated mechanisms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132167 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 00:19:40 +00:00
Chandler Carruth
b29c1d731a Fix warning about || and && without explicit grouping.
This looks like it flagged an actual bug. Devang, please review. I added
the parentheses that change behavior, but make the behavior more closely
match commit log's intent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132165 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 23:37:58 +00:00
Devang Patel
77ba0164fe Do not insert anything after terminator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132164 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 23:16:48 +00:00
Chad Rosier
62660310d9 Renamed llvm.x86.sse42.crc32 intrinsics; crc64 doesn't exist.
crc32.[8|16|32] have been renamed to .crc32.32.[8|16|32] and
crc64.[8|16|32] have been renamed to .crc32.64.[8|64].




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132163 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 23:13:19 +00:00
Eric Christopher
0958870a08 Comment cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132162 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 22:54:27 +00:00
Devang Patel
9dd19667fb Do not move DBG_VALUE in middle of PHI nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132161 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 22:43:14 +00:00
Devang Patel
97de92c08d If llvm.dbg.value and the value instruction it refers to are far apart then iSel may not be able to find corresponding Node for llvm.dbg.value during DAG construction. Make iSel's life easier by removing this distance between llvm.dbg.value and its value instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132151 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 21:51:06 +00:00
Devang Patel
95ba669e09 Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132149 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 21:49:28 +00:00
Devang Patel
785badb83e During branch folding avoid inserting redundant DBG_VALUE machine instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132148 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 21:47:59 +00:00
Akira Hatanaka
33458fedb6 Use MachineFrameInfo::hasCalls instead of MipsFunctionInfo::hasCall to check if
a function has any function calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132140 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 20:30:31 +00:00
Rafael Espindola
a5e62019d7 Fix some dwarf register numbers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132136 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 19:25:47 +00:00
Galina Kistanova
4f5716ab88 Make few ExecutionEngine tests XFAIL for ARM, since ExecutionEngine is broken for ARM, please remove the following XFAIL when it will be fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132135 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 19:17:14 +00:00
Rafael Espindola
c9687b32fa Fix LTO builds with xcode 4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132132 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 18:59:54 +00:00
Akira Hatanaka
cf0cd8005c Add support for C++ exception handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132131 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 18:59:03 +00:00
Eric Christopher
32bfb2c513 Reorganize these slightly according to operand type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132128 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 18:22:26 +00:00
Akira Hatanaka
78e72d60ec Set HasSetDirective to true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132127 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 18:16:18 +00:00
Eli Friedman
9ebfceee05 Fix test on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132126 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 18:00:32 +00:00
Charles Davis
cfb2bbba73 Revert r132111. I built Release (without Asserts), so I didn't know about the
assert that prevented setting alignment on section creation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132113 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 05:35:55 +00:00
Charles Davis
329cf66e84 Fix definitions of UOP_SaveXMM128, UOP_SaveXMM128Big, and UOP_PushMachFrame
to match Microsoft's definitions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132112 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 05:24:15 +00:00
Charles Davis
fad99ae6e7 Align Win64 EH Table sections to 4 bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132111 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 05:19:54 +00:00
Charles Davis
3ac7b034d6 Add a test for the chained directives that I forgot last time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132110 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 05:17:43 +00:00