Use FileCheck instead of grep. Change by Sonam.

Differential Revision: http://reviews.llvm.org/D6432



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222876 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Peephole optimization in switch table lookup: reuse the guarding table comparison if possible."

It is breaking the clang bootstrag.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222877 91177308-0d34-0410-b5e6-96231b3b80d8
Use FileCheck instead of grep. Change by Ankur Garg.

Differential Revision: http://reviews.llvm.org/D6430


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222879 91177308-0d34-0410-b5e6-96231b3b80d8
Stop uppercasing build attribute data.

The string data for string-valued build attributes were being unconditionally
uppercased. There is no mention in the ARM ABI addenda about case conventions,
so it's technically implementation defined as to whether the data are
capitialised in some way or not. However, there are good reasons not to
captialise the data.

  * It's less work.
  * Some vendors may legitimately have case-sensitive checks for these
    attributes which would fail on LLVM generated object files.
  * There could be locale issues with uppercasing.

The original reasons for uppercasing appear to have stemmed from an
old codesourcery toolchain behaviour, see

http://comments.gmane.org/gmane.comp.compilers.llvm.cvs/87133

This patch makes the object file emitted no longer captialise string
data, it encodes as seen in the assembly source.

Change-Id: Ibe20dd6e60d2773d57ff72a78470839033aa5538

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222882 91177308-0d34-0410-b5e6-96231b3b80d8
[mips][microMIPS] Implement disassembler support for 16-bit instructions LI16, ADDIUR1SP, ADDIUR2 and ADDIUS5

Differential Revision: http://reviews.llvm.org/D6419


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222887 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Remove indirect call wrapping code.

This functionality was only used in MSanDR, which is deprecated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222889 91177308-0d34-0410-b5e6-96231b3b80d8
reinstate r222872: Peephole optimization in switch table lookup: reuse the guarding table comparison if possible.

Fixed missing dominance check.
Original commit message:

This optimization tries to reuse the generated compare instruction, if there is a comparison against the default value after the switch.
Example:
   if (idx < tablesize)
      r = table[idx]; // table does not contain default_value
   else
      r = default_value;
   if (r != default_value)
      ...
Is optimized to:
   cond = idx < tablesize;
   if (cond)
      r = table[idx];
   else
      r = default_value;
   if (cond)
      ...
Jump threading will then eliminate the second if(cond).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222891 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Fix overly aggressive type merging."

This reverts commit r222727, which causes LTO bootstrap failures.

Last passing @ r222698:
http://lab.llvm.org:8080/green/job/clang-Rlto_master_build/532/

First failing @ r222843:
http://lab.llvm.org:8080/green/job/clang-Rlto_master_build/533/

Internal bootstraps pointed at a much narrower range: r222725 is
passing, and r222731 is failing.

LTO crashes while handling libclang.dylib:
http://lab.llvm.org:8080/green/job/clang-Rlto_master_build/533/consoleFull#-158682280549ba4694-19c4-4d7e-bec5-911270d8a58c

    GEP is not of right type for indices!
      %InfoObj.i.i = getelementptr inbounds %"class.llvm::OnDiskIterableChainedHashTable"* %.lcssa, i64 0, i32 0, i32 4, !dbg !123627
     %"class.clang::serialization::reader::ASTIdentifierLookupTrait" = type { %"class.clang::ASTReader.31859"*, %"class.clang::serialization::ModuleFile.31870"*, %"class.clang::IdentifierInfo"* }LLVM ERROR: Broken function found, compilation aborted!
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

Looks like the new algorithm doesn't merge types aggressively enough.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222895 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Reapply 222538 and update tests to explicitly request small code model and PIC:"

This reverts commit r222760.

It changed our behaviour on PIC so we don't match gas anymore. It also
included lots of unnecessary changes to tests.

If those changes are desirable, there should be an independent discussion
as they are out of scope for that patch.

I will recommit the other bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222896 91177308-0d34-0410-b5e6-96231b3b80d8
Commit back the correct bits of r222760 (was r222538).

I also added a test.

Original message:

Allow FDE references outside the +/-2GB range supported by PC relative
offsets for code models other than small/medium. For JIT application,
memory layout is less controlled and can result in truncations
otherwise.

Patch from Akos Kiss.

Differential Revision: http://reviews.llvm.org/D6079

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222897 91177308-0d34-0410-b5e6-96231b3b80d8
Widen ELFYAML relocation type to 32 bits

The current 8 bits is sufficient for ELF32 targets but ELF64 requires
32 bits. Add a test for AArch64 that exposes the issue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222898 91177308-0d34-0410-b5e6-96231b3b80d8
[mips] Add synci instruction.

Patch by Amaury Pouly

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6421


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222899 91177308-0d34-0410-b5e6-96231b3b80d8
[mips][microMIPS] Implement BREAK16 and SDBBP16 instructions

Patch by Radovan Obradovic.

Differential Revision: http://reviews.llvm.org/D5048


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222900 91177308-0d34-0410-b5e6-96231b3b80d8
[mips][microMIPS] Implement SWM16 and LWM16 instructions
Differential Revision: http://reviews.llvm.org/D5579


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222901 91177308-0d34-0410-b5e6-96231b3b80d8
Merge branch 'master', remote-tracking branch 'trunk/master'