1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

91024 Commits

Author SHA1 Message Date
Preston Gurd
8e4196dfe6 Use FileCheck instead of grep.
llvm-svn: 179322
2013-04-11 21:39:01 +00:00
David Majnemer
2a9a6a16c4 Fix undefined behavior in AArch64
A64Imms::isLogicalImmBits and A64Imms::isLogicalImm will attempt to
execute shifts that perform undefined behavior. Instead of attempting
to perform the 64-bit rotation, treat it as a no-op.

llvm-svn: 179317
2013-04-11 20:13:52 +00:00
David Majnemer
82ec1d080e Optimize icmp involving addition better
Allows LLVM to optimize sequences like the following:

%add = add nsw i32 %x, 1
%cmp = icmp sgt i32 %add, %y

into:

%cmp = icmp sge i32 %x, %y

as well as:

%add1 = add nsw i32 %x, 20
%add2 = add nsw i32 %y, 57
%cmp = icmp sge i32 %add1, %add2

into:

%add = add nsw i32 %y, 37
%cmp = icmp sle i32 %cmp, %x

llvm-svn: 179316
2013-04-11 20:05:46 +00:00
Jack Carter
834846d7a8 Mips specific inline asm memory operand modifier test case
These changes are based on commit responses for r179135.

llvm-svn: 179315
2013-04-11 19:39:19 +00:00
Akira Hatanaka
2b0ffc5124 [mips] Custom-lower i64 MULHS and MULHU nodes. Remove the code which selects
multiply instructions in MipsSEDAGToDAGISel.

This patch was supposed to be part of r178403.

llvm-svn: 179314
2013-04-11 19:29:26 +00:00
Akira Hatanaka
10518e983d [mips] Clean up MipsISelDAGToDAG.cpp and MipsISelLowering.cpp.
- Rename function.
- Pass iterator by value.
- Remove header include.

No functionality changes.

llvm-svn: 179312
2013-04-11 19:07:14 +00:00
Rafael Espindola
6c9d485a40 Revert my last two commits while I debug what is wrong in a big endian host.
llvm-svn: 179303
2013-04-11 17:46:10 +00:00
Rafael Espindola
a8d1f9a6ee Fix llvm-readobj tests on big endian hosts.
llvm-svn: 179298
2013-04-11 17:23:23 +00:00
Rafael Espindola
857bda0e10 Print more information about relocations.
With this patch llvm-readobj now prints if a relocation is pcrel, its length,
if it is extern and if it is scattered.

It also refactors the code a bit to use bit fields instead of shifts and
masks all over the place.

llvm-svn: 179294
2013-04-11 16:31:37 +00:00
Benjamin Kramer
3b38288ea2 Fix for wrong instcombine on vector insert/extract
When trying to collapse sequences of insertelement/extractelement
instructions into single shuffle instructions, there is one specific
case where the Instruction Combiner wrongly updates the resulting
Mask of shuffle indexes.

The problem is in function CollectShuffleElments.

If we have a sequence of insert/extract element instructions
like the one below:

  %tmp1 = extractelement <4 x float> %LHS, i32 0
  %tmp2 = insertelement <4 x float> %RHS, float %tmp1, i32 1
  %tmp3 = extractelement <4 x float> %RHS, i32 2
  %tmp4 = insertelement <4 x float> %tmp2, float %tmp3, i32 3

Where:
  . %RHS will have a mask of [4,5,6,7]
  . %LHS will have a mask of [0,1,2,3]

The Mask of shuffle indexes is wrongly computed to [4,1,6,7]
instead of [4,0,6,7].
When analyzing %tmp2 in order to compute the Mask for the
resulting shuffle instruction, the algorithm forgets to update
the mask index at position 1 with the index associated to the
element extracted from %LHS by instruction %tmp1.

Patch by Andrea DiBiagio!

llvm-svn: 179291
2013-04-11 15:10:09 +00:00
Eli Bendersky
0ce49fd520 Add a CHECK-NOT for a more faithful translation of the original grep | count 2.
Thanks to Reid Kleckner for catching this.

llvm-svn: 179289
2013-04-11 14:43:19 +00:00
Rafael Espindola
4f785c387d Add a function to check if an argument list is too long.
This will be used in clang to decide if it should create an @file or not. It
will be tested on the clang side.

Patch by Nathan Froyd.

llvm-svn: 179285
2013-04-11 14:06:34 +00:00
Alexey Samsonov
e5e655ef63 [ASan] Allow disabling init-order checks for globals by source file name.
llvm-svn: 179280
2013-04-11 13:20:00 +00:00
Sylvestre Ledru
2a70d33f13 Add myself in the CREDITS.TXT
llvm-svn: 179279
2013-04-11 13:15:39 +00:00
Benjamin Kramer
f15ba24b8d Add missing colons to check lines.
llvm-svn: 179277
2013-04-11 12:41:41 +00:00
Benjamin Kramer
4413e71a39 FileCheckize a bunch of tests.
llvm-svn: 179276
2013-04-11 12:32:23 +00:00
Benjamin Kramer
18adcb8049 Add braces around || in && to pacify GCC.
llvm-svn: 179275
2013-04-11 11:57:01 +00:00
Benjamin Kramer
cf2731d0e0 Rename the C function to create a SLPVectorizerPass to something sane and expose it in the header file.
llvm-svn: 179272
2013-04-11 11:36:36 +00:00
Michael Liao
877d1576e6 Optimize vector select from all 0s or all 1s
As packed comparisons in AVX/SSE produce all 0s or all 1s in each SIMD lane,
vector select could be simplified to AND/OR or removed if one or both values
being selected is all 0s or all 1s.

llvm-svn: 179267
2013-04-11 05:15:54 +00:00
Michael Liao
75c886a312 Add CLAC/STAC instruction encoding/decoding support
As these two instructions in AVX extension are privileged instructions for
special purpose, it's only expected to be used in inlined assembly.

llvm-svn: 179266
2013-04-11 04:52:28 +00:00
Michael Liao
87125582e9 Enhance bool simplifcation in X86 to handle more cases
This patch is revised based on patch from Victor Umansky
<victor.umansky@intel.com>. More cases are handled in X86's bool
simplification, i.e.
- SETCC_CARRY
- value is truncated to i1 with AND

As a by-product, PR5443 is also fixed.

llvm-svn: 179265
2013-04-11 04:43:09 +00:00
NAKAMURA Takumi
c9309ae42b R600ControlFlowFinalizer.cpp: Fix a warning. [-Wunused-variable]
llvm-svn: 179263
2013-04-11 04:16:27 +00:00
NAKAMURA Takumi
1837d9ec3e Whitespace.
llvm-svn: 179262
2013-04-11 04:16:22 +00:00
Rafael Espindola
09d9620af5 Simplify the code. No functionality change.
llvm-svn: 179259
2013-04-11 03:34:37 +00:00
Rafael Espindola
3ac0776aa4 Add MachO-x86-64 tests.
The object was already checked in, but was not being tested.

llvm-svn: 179256
2013-04-11 02:52:29 +00:00
Rafael Espindola
25654a6ef4 Fix MachO's getRelocationAdditionalInfo.
It was returning the loaded address of the section containing the relocation,
which really doesn't seem to be the intent of this function.

llvm-svn: 179255
2013-04-11 02:21:31 +00:00
Hal Finkel
f28d7e2863 Make PPCInstrInfo::isPredicated always return false
Because of how predication in implemented on PPC (only for branches), I think
that this is the right thing to do.  No functionality change intended.

llvm-svn: 179252
2013-04-11 01:23:34 +00:00
Daniel Dunbar
2b76085497 lit: Don't descend into .git directories during test discovery.
llvm-svn: 179249
2013-04-11 00:31:35 +00:00
Daniel Dunbar
aeb45789dd lit: Shorten a metavar to make --help look nicer.
llvm-svn: 179248
2013-04-11 00:31:27 +00:00
Daniel Dunbar
35c0a36655 lit: Add a test for discovery when exact test names are given.
llvm-svn: 179247
2013-04-11 00:31:22 +00:00
Nico Rieck
36a98e60d3 Add man page for llvm-readobj
llvm-svn: 179244
2013-04-11 00:05:57 +00:00
Daniel Dunbar
0415c80e33 lit: Add a trivial test of the basic progress bar.
llvm-svn: 179243
2013-04-11 00:05:37 +00:00
Eli Bendersky
90daaa543a Rewrite some of the test/CodeGen/X86 tests to use FileCheck instead of grep
llvm-svn: 179241
2013-04-10 23:30:20 +00:00
Nico Rieck
8e22855ea6 MC: Support COFF image-relative MCSymbolRefs
Add support for the COFF relocation types IMAGE_REL_I386_DIR32NB and
IMAGE_REL_AMD64_ADDR32NB for 32- and 64-bit respectively. These are
similar to normal 4-byte relocations except that they do not include
the base address of the image.

Image-relative relocations are used for debug information (32-bit) and
SEH unwind tables (64-bit).

A new MCSymbolRef variant called 'VK_COFF_IMGREL32' is introduced to
specify such relocations. For AT&T assembly, this variant can be accessed
using the symbol suffix '@imgrel'.

llvm-svn: 179240
2013-04-10 23:28:17 +00:00
Joey Gouly
08202d2a86 Delete the functions F1 and F2 to appease the valgrind bot.
llvm-svn: 179239
2013-04-10 23:21:26 +00:00
Hal Finkel
03d47320aa Manually remove successors in if conversion when CopyAndPredicateBlock is used
In the simple and triangle if-conversion cases, when CopyAndPredicateBlock is
used because the to-be-predicated block has other predecessors, we need to
explicitly remove the old copied block from the successors list. Normally if
conversion relies on TII->AnalyzeBranch combined with BB->CorrectExtraCFGEdges
to cleanup the successors list, but if the predicated block contained an
un-analyzable branch (such as a now-predicated return), then this will fail.

These extra successors were causing a problem on PPC because it was causing
later passes (such as PPCEarlyReturm) to leave dead return-only basic blocks in
the code.

llvm-svn: 179227
2013-04-10 22:05:25 +00:00
Bill Wendling
bb6240cd02 No need to have this return a bool.
llvm-svn: 179226
2013-04-10 22:03:59 +00:00
Jack Carter
8e319ed798 Mips specific inline asm memory operand modifier test case
These changes are based on commit responses for r179135.

llvm-svn: 179225
2013-04-10 22:02:32 +00:00
Bill Wendling
10e42f6056 Move info to CREDITS.TXT file.
llvm-svn: 179224
2013-04-10 21:56:52 +00:00
Kay Tiong Khoo
5f12d15d44 fixed xsave, xsaveopt, xrstor mnemonics with intel syntax; added test cases
llvm-svn: 179223
2013-04-10 21:52:25 +00:00
Eric Christopher
d419b3e326 Revert "Update the version of dwarf we say we're emitting to at least 3."
temporarily while we work on plumbing through some changes to continue
supporting gdb on darwin.

This reverts commit r179122.

llvm-svn: 179222
2013-04-10 21:45:07 +00:00
Bill Wendling
e53a442937 Track the compact unwind encoding for when we are unable to generate compact unwind information.
Compact unwind has an encoding for when we're not able to generate compact
unwind and must generate an EH frame instead. Track that, but still emit that CU
encoding.

llvm-svn: 179220
2013-04-10 21:42:06 +00:00
Kay Tiong Khoo
ba75929324 fixed to disassemble with tab after mnemonic rather than space
llvm-svn: 179215
2013-04-10 21:17:58 +00:00
Benjamin Kramer
3e5bfd1df4 Use a real union for IdentifyingPassPtr.
This avoids a nasty const correctness issue (AnalysisIDs are const, Pass* isn't).

llvm-svn: 179213
2013-04-10 20:50:44 +00:00
Bill Wendling
a4cf35cb28 Marking myself as release manager.
If anyone objects please let me know.

llvm-svn: 179212
2013-04-10 20:13:28 +00:00
Preston Gurd
de5cf7a23b In the X86 back end, getMemoryOperandNo() returns the offset
into the operand array of the start of the memory reference descriptor.

Additional code in EncodeInstruction provides an additional adjustment.

This patch places that additional code in a separate function,
called getOperandBias, so that any caller of getMemoryOperandNo
can also call getOperandBias.

llvm-svn: 179211
2013-04-10 20:11:59 +00:00
Chad Rosier
b0156236cb Tidy up, fix and simplify a few of the SMLocs. Prior to r179109 the Start SMLoc
wasn't always the start of the operand.  If there was a symbol reference, then
Start pointed to that token.  It's very likely there are other places that need
to be updated.

llvm-svn: 179210
2013-04-10 20:07:47 +00:00
Jyotsna Verma
b244dff2f1 Add object-emission flag for lit tests. This flag is used
to disable following tests for Hexagon that require direct object
generation support.

DebugInfo/dwarf-public-names.ll
DebugInfo/dwarf-version.ll
DebugInfo/member-pointers.ll
DebugInfo/namespace.ll
DebugInfo/two-cus-from-same-file.ll

Fixes bug 15616 - http://llvm.org/bugs/show_bug.cgi?id=15616

llvm-svn: 179209
2013-04-10 19:53:26 +00:00
Nadav Rotem
6a6b998435 Make the SLP store-merger less paranoid about function calls. We check for function calls when we check if it is safe to sink instructions.
llvm-svn: 179207
2013-04-10 19:41:36 +00:00
Nadav Rotem
aa6eefd489 We require DataLayout for analyzing the size of stores.
llvm-svn: 179206
2013-04-10 18:57:27 +00:00